diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index 08148769f5..bcb051c9e8 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -175,7 +175,7 @@ module GitHub end begin - if !http_code.start_with?("2") && !status.success? + if !http_code.start_with?("2") || !status.success? raise_api_error(output, errors, http_code, headers, scopes) end json = JSON.parse output