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.
This commit is contained in:
		
							parent
							
								
									bcedfe64e8
								
							
						
					
					
						commit
						08fb36252c
					
				@ -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}"
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user