diff options
| author | Zhiming Wang | 2017-04-29 19:30:19 -0400 | 
|---|---|---|
| committer | Zhiming Wang | 2017-04-29 19:30:19 -0400 | 
| commit | 7a75de7cb135cfa832acbf58819329cc19b0fe41 (patch) | |
| tree | c525ae5670d49521876b04de7045a0e22898ca98 /Library/Homebrew/dev-cmd/pull.rb | |
| parent | b067700fd7a06f4f4a7eac006d5dae990c466a90 (diff) | |
| download | brew-7a75de7cb135cfa832acbf58819329cc19b0fe41.tar.bz2 | |
pull: fix status code check in check_bintray_mirror
The status code of the last redirect should be 2xx to be deemed successful.
Diffstat (limited to 'Library/Homebrew/dev-cmd/pull.rb')
| -rw-r--r-- | Library/Homebrew/dev-cmd/pull.rb | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/dev-cmd/pull.rb b/Library/Homebrew/dev-cmd/pull.rb index 0616b990b..9d08da95b 100644 --- a/Library/Homebrew/dev-cmd/pull.rb +++ b/Library/Homebrew/dev-cmd/pull.rb @@ -608,7 +608,7 @@ module Homebrew    def check_bintray_mirror(name, url)      headers = curl_output("--connect-timeout", "15", "--head", url)[0]      status_code = headers.scan(%r{^HTTP\/.* (\d+)}).last.first -    return if status_code.start_with?("3") +    return if status_code.start_with?("2")      opoo "The Bintray mirror #{url} is not reachable (HTTP status code #{status_code})."      opoo "Do you need to upload it with `brew mirror #{name}`?"    end  | 
