Skip to content

Commit

Permalink
gh create-from-local - fixed quoting bug to prevented project creation
Browse files Browse the repository at this point in the history
  • Loading branch information
drnic committed Dec 16, 2009
1 parent 6f99b30 commit 52b1be0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion History.txt
@@ -1,7 +1,8 @@
== 0.4.1 NOT YET RELEASED == 0.4.1


Updated Commands: Updated Commands:
* gh home - no longer appends /tree/master to the end of the URL * gh home - no longer appends /tree/master to the end of the URL
* gh create-from-local - fixed quoting bug to prevented project creation


== 0.4.0 == 0.4.0


Expand Down
3 changes: 2 additions & 1 deletion lib/commands/commands.rb
Expand Up @@ -233,7 +233,8 @@
repo = File.basename(cwd) repo = File.basename(cwd)
is_repo = !git("status").match(/fatal/) is_repo = !git("status").match(/fatal/)
raise "Not a git repository. Use gh create instead" unless is_repo raise "Not a git repository. Use gh create instead" unless is_repo
sh "curl -F 'repository[name]=#{repo}' -F 'repository[public]=#{!options[:private].inspect} -F 'login=#{github_user}' -F 'token=#{github_token}' http://github.com/repositories" puts "curl -F 'repository[name]=#{repo}' -F 'repository[public]=#{!options[:private].inspect}' -F 'login=#{github_user}' -F 'token=#{github_token}' http://github.com/repositories"
sh "curl -F 'repository[name]=#{repo}' -F 'repository[public]=#{!options[:private].inspect}' -F 'login=#{github_user}' -F 'token=#{github_token}' http://github.com/repositories"
git "remote add origin git@github.com:#{github_user}/#{repo}.git" git "remote add origin git@github.com:#{github_user}/#{repo}.git"
git_exec "push origin master" git_exec "push origin master"
end end
Expand Down

0 comments on commit 52b1be0

Please sign in to comment.