Merge pull request #11973 from samford/livecheck/improve-curl-error-message-handling

Strategy: Improve curl error message finding
This commit is contained in:
Sam Ford 2021-09-07 00:36:17 -04:00 committed by GitHub
commit 84f4fbf3cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -247,10 +247,8 @@ module Homebrew
return data
end
/^(?<error_msg>curl: \(\d+\) .+)/ =~ stderr
{
messages: [error_msg.presence || "cURL failed without an error"],
}
error_msgs = stderr&.scan(/^curl:.+$/)
{ messages: error_msgs.presence || ["cURL failed without a detectable error"] }
end
# Handles the return value from a `strategy` block in a `livecheck`