Browse files

Changed create-from-local to create public repo

There was an error with the --private option
that caused it to always create a private
repo, which does not work for many users,
it now correctly interprets the --private flag
  • Loading branch information...
1 parent 14e7f41 commit 52836700c6ddf01191bc90f532fe418169ab2c86 @ScottDugas ScottDugas committed Jul 25, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/commands/commands.rb
2 lib/commands/commands.rb
@@ -233,7 +233,7 @@
repo = File.basename(cwd)
is_repo = !git("status").match(/fatal/)
raise "Not a git repository. Use gh create instead" unless is_repo
- created = sh "curl -F 'repository[name]=#{repo}' -F 'repository[public]=#{!options[:private].inspect}' -F 'login=#{github_user}' -F 'token=#{github_token}'"
+ created = sh "curl -F 'repository[name]=#{repo}' -F 'repository[public]=#{options[:private] != true}' -F 'login=#{github_user}' -F 'token=#{github_token}'"
if created.out =~ %r{You are being <a href="{github_user}/([^"]+)"}
git "remote add origin{github_user}/#{$1}.git"
git_exec "push origin master"

0 comments on commit 5283670

Please sign in to comment.