mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Cleanup ARGV.include? usage
Remove usage where `Homebrew.args` could be used instead or, due to the `Homebrew.args` parsing, there was dead code that was never executed (and no-one complained about not working).
This commit is contained in:
parent
7bd454746e
commit
5f721c6986
@ -81,7 +81,7 @@ module Homebrew
|
||||
ignores << "optional?"
|
||||
end
|
||||
|
||||
ignores << "recommended?" if ARGV.include? "--skip-recommended"
|
||||
ignores << "recommended?" if Homebrew.args.skip_recommended?
|
||||
|
||||
[includes, ignores]
|
||||
end
|
||||
|
@ -235,20 +235,6 @@ module SharedEnvExtension
|
||||
ohai "Building with an alternative Fortran compiler"
|
||||
puts "This is unsupported."
|
||||
self["F77"] ||= fc
|
||||
|
||||
if ARGV.include? "--default-fortran-flags"
|
||||
flags = FC_FLAG_VARS.reject { |key| self[key] }
|
||||
elsif values_at(*FC_FLAG_VARS).compact.empty?
|
||||
opoo <<~EOS
|
||||
No Fortran optimization information was provided. You may want to consider
|
||||
setting FCFLAGS and FFLAGS or pass the `--default-fortran-flags` option to
|
||||
`brew install` if your compiler is compatible with GCC.
|
||||
|
||||
If you like the default optimization level of your compiler, ignore this
|
||||
warning.
|
||||
EOS
|
||||
end
|
||||
|
||||
else
|
||||
if (gfortran = which("gfortran", (HOMEBREW_PREFIX/"bin").to_s))
|
||||
ohai "Using Homebrew-provided Fortran compiler."
|
||||
|
@ -52,7 +52,7 @@ class FormulaInstaller
|
||||
@build_from_source = Homebrew.args.build_from_source?
|
||||
@build_bottle = false
|
||||
@force_bottle = Homebrew.args.force_bottle?
|
||||
@include_test = ARGV.include?("--include-test")
|
||||
@include_test = Homebrew.args.include_test?
|
||||
@interactive = false
|
||||
@git = false
|
||||
@verbose = Homebrew.args.verbose?
|
||||
@ -707,7 +707,6 @@ 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"
|
||||
args << "--keep-tmp" if Homebrew.args.keep_tmp?
|
||||
|
||||
if ARGV.env
|
||||
|
@ -78,7 +78,7 @@ module Homebrew
|
||||
case output_type
|
||||
when :print
|
||||
args << "--debug" if ARGV.debug?
|
||||
args << "--display-cop-names" if ARGV.include? "--display-cop-names"
|
||||
args << "--display-cop-names" if Homebrew.args.display_cop_names?
|
||||
args << "--format" << "simple" if files
|
||||
system(cache_env, "rubocop", *args)
|
||||
rubocop_success = $CHILD_STATUS.success?
|
||||
|
Loading…
x
Reference in New Issue
Block a user