ARGV: Replace options_only and flags_only with Homebrew.args counterparts
This commit is contained in:
parent
d18b122272
commit
393c8dfbf1
@ -25,6 +25,7 @@ module Homebrew
|
||||
raise "`brew cat` doesn't support multiple arguments" if args.remaining.size > 1
|
||||
|
||||
cd HOMEBREW_REPOSITORY
|
||||
safe_system "cat", formulae.first.path, *ARGV.options_only
|
||||
cat_args = Homebrew.args.options_only - CLI::Parser.global_options.values.map(&:first).flatten
|
||||
safe_system "cat", formulae.first.path, *cat_args
|
||||
end
|
||||
end
|
||||
|
||||
@ -70,7 +70,8 @@ module Homebrew
|
||||
puts Formatter.columns(full_names)
|
||||
else
|
||||
ENV["CLICOLOR"] = nil
|
||||
safe_system "ls", *ARGV.options_only << HOMEBREW_CELLAR
|
||||
ls_args = Homebrew.args.options_only - CLI::Parser.global_options.values.map(&:first).flatten
|
||||
safe_system "ls", *ls_args << HOMEBREW_CELLAR
|
||||
end
|
||||
elsif args.verbose? || !$stdout.tty?
|
||||
system_command! "find", args: ARGV.kegs.map(&:to_s) + %w[-not -type d -print], print_stdout: true
|
||||
|
||||
@ -57,7 +57,7 @@ module Homebrew
|
||||
git -C "#{git_cd}" fetch --unshallow
|
||||
EOS
|
||||
end
|
||||
args = ARGV.options_only
|
||||
args = Homebrew.args.options_only
|
||||
args += ["--follow", "--", path] unless path.nil?
|
||||
system "git", "log", *args
|
||||
end
|
||||
|
||||
@ -162,7 +162,7 @@ module Homebrew
|
||||
tab = Tab.for_keg(keg)
|
||||
end
|
||||
|
||||
build_options = BuildOptions.new(Options.create(ARGV.flags_only), f.options)
|
||||
build_options = BuildOptions.new(Options.create(Homebrew.args.flags_only), f.options)
|
||||
options = build_options.used_options
|
||||
options |= f.build.used_options
|
||||
options &= f.options
|
||||
|
||||
@ -82,7 +82,7 @@ module Homebrew
|
||||
--
|
||||
#{HOMEBREW_LIBRARY_PATH}/test.rb
|
||||
#{f.path}
|
||||
].concat(ARGV.options_only)
|
||||
].concat(Homebrew.args.options_only)
|
||||
|
||||
if f.head?
|
||||
args << "--HEAD"
|
||||
|
||||
@ -16,7 +16,7 @@ module Homebrew
|
||||
backup keg
|
||||
end
|
||||
|
||||
build_options = BuildOptions.new(Options.create(ARGV.flags_only), f.options)
|
||||
build_options = BuildOptions.new(Options.create(Homebrew.args.flags_only), f.options)
|
||||
options = build_options.used_options
|
||||
options |= f.build.used_options
|
||||
options &= f.options
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user