aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMartin Afanasjew2016-01-10 02:41:00 +0100
committerMartin Afanasjew2016-01-10 02:59:22 +0100
commit08fb36252c2495c7886d2dac1a837613795b3555 (patch)
tree591281fd57c096c22762d5eb5cb7215e6378a903 /Library
parentbcedfe64e8ca64e092ca72c3f61fe164c28c8af5 (diff)
downloadbrew-08fb36252c2495c7886d2dac1a837613795b3555.tar.bz2
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.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_installer.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index a9c99ae44..3c0ab181d 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}"