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?"
|
ignores << "optional?"
|
||||||
end
|
end
|
||||||
|
|
||||||
ignores << "recommended?" if ARGV.include? "--skip-recommended"
|
ignores << "recommended?" if Homebrew.args.skip_recommended?
|
||||||
|
|
||||||
[includes, ignores]
|
[includes, ignores]
|
||||||
end
|
end
|
||||||
|
@ -235,20 +235,6 @@ module SharedEnvExtension
|
|||||||
ohai "Building with an alternative Fortran compiler"
|
ohai "Building with an alternative Fortran compiler"
|
||||||
puts "This is unsupported."
|
puts "This is unsupported."
|
||||||
self["F77"] ||= fc
|
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
|
else
|
||||||
if (gfortran = which("gfortran", (HOMEBREW_PREFIX/"bin").to_s))
|
if (gfortran = which("gfortran", (HOMEBREW_PREFIX/"bin").to_s))
|
||||||
ohai "Using Homebrew-provided Fortran compiler."
|
ohai "Using Homebrew-provided Fortran compiler."
|
||||||
|
@ -52,7 +52,7 @@ class FormulaInstaller
|
|||||||
@build_from_source = Homebrew.args.build_from_source?
|
@build_from_source = Homebrew.args.build_from_source?
|
||||||
@build_bottle = false
|
@build_bottle = false
|
||||||
@force_bottle = Homebrew.args.force_bottle?
|
@force_bottle = Homebrew.args.force_bottle?
|
||||||
@include_test = ARGV.include?("--include-test")
|
@include_test = Homebrew.args.include_test?
|
||||||
@interactive = false
|
@interactive = false
|
||||||
@git = false
|
@git = false
|
||||||
@verbose = Homebrew.args.verbose?
|
@verbose = Homebrew.args.verbose?
|
||||||
@ -707,7 +707,6 @@ class FormulaInstaller
|
|||||||
args << "--verbose" if verbose?
|
args << "--verbose" if verbose?
|
||||||
args << "--debug" if debug?
|
args << "--debug" if debug?
|
||||||
args << "--cc=#{ARGV.cc}" if ARGV.cc
|
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?
|
args << "--keep-tmp" if Homebrew.args.keep_tmp?
|
||||||
|
|
||||||
if ARGV.env
|
if ARGV.env
|
||||||
|
@ -78,7 +78,7 @@ module Homebrew
|
|||||||
case output_type
|
case output_type
|
||||||
when :print
|
when :print
|
||||||
args << "--debug" if ARGV.debug?
|
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
|
args << "--format" << "simple" if files
|
||||||
system(cache_env, "rubocop", *args)
|
system(cache_env, "rubocop", *args)
|
||||||
rubocop_success = $CHILD_STATUS.success?
|
rubocop_success = $CHILD_STATUS.success?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user