diff options
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/audit.rb')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/audit.rb | 10 | 
1 files changed, 9 insertions, 1 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/audit.rb b/Library/Homebrew/cask/lib/hbc/audit.rb index cee1fe807..b8bb6ab81 100644 --- a/Library/Homebrew/cask/lib/hbc/audit.rb +++ b/Library/Homebrew/cask/lib/hbc/audit.rb @@ -143,7 +143,15 @@ module Hbc      def check_appcast_http_code        odebug "Verifying appcast returns 200 HTTP response code" -      result = @command.run("/usr/bin/curl", args: ["--compressed", "--location", "--user-agent", URL::FAKE_USER_AGENT, "--output", "/dev/null", "--write-out", "%{http_code}", cask.appcast], print_stderr: false) + +      curl_executable, *args = curl_args( +        "--compressed", "--location", "--fail", +        "--write-out", "%{http_code}", +        "--output", "/dev/null", +        cask.appcast, +        user_agent: :fake +      ) +      result = @command.run(curl_executable, args: args, print_stderr: false)        if result.success?          http_code = result.stdout.chomp          add_warning "unexpected HTTP response code retrieving appcast: #{http_code}" unless http_code == "200"  | 
