From 08fb36252c2495c7886d2dac1a837613795b3555 Mon Sep 17 00:00:00 2001 From: Martin Afanasjew Date: Sun, 10 Jan 2016 02:41:00 +0100 Subject: [PATCH] formula_installer: fix --default-fortran-flags Setting the `FC` environment variable allows the user to override the default Fortran compiler. The `SharedEnvExtension#fortran` method then checks whether any of `FCFLAGS` and `FFLAGS` environment variables are set and, if not, suggests to use `--default-fortran-flags` when running `brew install`. However, `--default-fortran-flags` never makes it to `build.rb` (that is executed by `FormulaInstaller`) because the flag is not whitelisted in `FormulaInstaller#sanitized_ARGV_options`. This change rectifies this and thereby eliminates the confusing message. Fixes Homebrew/homebrew#47852. --- Library/Homebrew/formula_installer.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index a9c99ae442..3c0ab181d3 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -503,6 +503,7 @@ class FormulaInstaller args << "--verbose" if verbose? args << "--debug" if debug? args << "--cc=#{ARGV.cc}" if ARGV.cc + args << "--default-fortran-flags" if ARGV.include? "--default-fortran-flags" if ARGV.env args << "--env=#{ARGV.env}"