Skip to content

Commit

Permalink
utils/github: fix reverted order of credentials
Browse files Browse the repository at this point in the history
We always return the token/password first and, if applicable, the user
name is the second element in the returned array.

Closes Homebrew#581.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
  • Loading branch information
UniqMartin committed Jul 27, 2016
1 parent bdc1991 commit 87540ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Library/Homebrew/utils/github.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def api_credentials
if ENV["HOMEBREW_GITHUB_API_TOKEN"]
ENV["HOMEBREW_GITHUB_API_TOKEN"]
elsif ENV["HOMEBREW_GITHUB_API_USERNAME"] && ENV["HOMEBREW_GITHUB_API_PASSWORD"]
[ENV["HOMEBREW_GITHUB_API_USERNAME"], ENV["HOMEBREW_GITHUB_API_PASSWORD"]]
[ENV["HOMEBREW_GITHUB_API_PASSWORD"], ENV["HOMEBREW_GITHUB_API_USERNAME"]]
else
github_credentials = api_credentials_from_keychain
github_username = github_credentials[/username=(.+)/, 1]
Expand Down

0 comments on commit 87540ad

Please sign in to comment.