From be418d81e650e269e50597175c8aa725b2025457 Mon Sep 17 00:00:00 2001 From: mavenor Date: Sat, 24 Feb 2024 00:19:24 +0530 Subject: [PATCH] Strategy#page_content: allow cURL to `--fail-with-body` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit since `curl_output` (introduced in #15351) sets `show_output: true`, it doesn’t let it unless some form of --fail[...] is passed explicitly --- Library/Homebrew/livecheck/strategy.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Library/Homebrew/livecheck/strategy.rb b/Library/Homebrew/livecheck/strategy.rb index 1fd2c556ec..72500a9584 100644 --- a/Library/Homebrew/livecheck/strategy.rb +++ b/Library/Homebrew/livecheck/strategy.rb @@ -58,6 +58,9 @@ module Homebrew # `curl` arguments used in `Strategy#page_content` method. PAGE_CONTENT_CURL_ARGS = ([ "--compressed", + # Allow the return of an error code on exit, so that we can retry + # with a fake UA string (e.g. for Cloudflare-protected sites) + "--fail-with-body", # Include HTTP response headers in output, so we can identify the # final URL after any redirections "--include",