Skip to content

Commit

Permalink
Needed to add --global to the suggest git commands
Browse files Browse the repository at this point in the history
  • Loading branch information
keithpitt committed Jan 15, 2011
1 parent 052748c commit 1c94044
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/github/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def die(message)
def github_user
user = git("config --get github.user")
if user.empty?
die("You must 'git config github.user [your Github username]' before running this command")
die("You must 'git config --global github.user [your Github username]' before running this command")
end

user
Expand All @@ -78,7 +78,7 @@ def github_user
def github_token
token = git("config --get github.token")
if token.empty?
die("You must 'git config github.token [your API token]' before running this command")
die("You must 'git config --global github.token [your API token]' before running this command")
end

token
Expand Down
4 changes: 2 additions & 2 deletions spec/command_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@

it "should die if a github API token cannot be found" do
@command.should_receive(:git).once.with("config --get github.token").and_return("")
@command.should_receive(:puts).once.with("=> You must 'git config github.token [your API token]' before running this command")
@command.should_receive(:puts).once.with("=> You must 'git config --global github.token [your API token]' before running this command")
@command.should_receive(:exit!).once
@command.github_token
end

it "should die if a github username token cannot be found" do
@command.should_receive(:git).once.with("config --get github.user").and_return("")
@command.should_receive(:puts).once.with("=> You must 'git config github.user [your Github username]' before running this command")
@command.should_receive(:puts).once.with("=> You must 'git config --global github.user [your Github username]' before running this command")
@command.should_receive(:exit!).once
@command.github_user
end
Expand Down

0 comments on commit 1c94044

Please sign in to comment.