Skip to content

Commit 5283670

Browse files
committed
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
1 parent 14e7f41 commit 5283670

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/commands/commands.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@
233233
repo = File.basename(cwd)
234234
is_repo = !git("status").match(/fatal/)
235235
raise "Not a git repository. Use gh create instead" unless is_repo
236-
created = sh "curl -F 'repository[name]=#{repo}' -F 'repository[public]=#{!options[:private].inspect}' -F 'login=#{github_user}' -F 'token=#{github_token}' http://github.com/repositories"
236+
created = sh "curl -F 'repository[name]=#{repo}' -F 'repository[public]=#{options[:private] != true}' -F 'login=#{github_user}' -F 'token=#{github_token}' http://github.com/repositories"
237237
if created.out =~ %r{You are being <a href="http://github.com/#{github_user}/([^"]+)"}
238238
git "remote add origin git@github.com:#{github_user}/#{$1}.git"
239239
git_exec "push origin master"

0 commit comments

Comments
 (0)