Skip to content

Commit

Permalink
Merge pull request #13913 from carlocab/test-compiler
Browse files Browse the repository at this point in the history
extend/ENV/std: ignore `fails_with` during `brew test`.
  • Loading branch information
carlocab committed Sep 22, 2022
2 parents cad6f1c + 1d9ee93 commit 03b7611
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Library/Homebrew/extend/ENV/std.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,14 @@ def setup_build_environment(formula: nil, cc: nil, build_bottle: false, bottle_a
# Os is the default Apple uses for all its stuff so let's trust them
define_cflags "-Os #{SAFE_CFLAGS_FLAGS}"

send(compiler)
begin
send(compiler)
rescue CompilerSelectionError
# We don't care if our compiler fails to build the formula during `brew test`.
raise unless testing_formula

send(DevelopmentTools.default_compiler)
end

return unless cc&.match?(GNU_GCC_REGEXP)

Expand Down

0 comments on commit 03b7611

Please sign in to comment.