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
|
raise "`brew cat` doesn't support multiple arguments" if args.remaining.size > 1
|
||||||
|
|
||||||
cd HOMEBREW_REPOSITORY
|
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
|
||||||
end
|
end
|
||||||
|
|||||||
@ -70,7 +70,8 @@ module Homebrew
|
|||||||
puts Formatter.columns(full_names)
|
puts Formatter.columns(full_names)
|
||||||
else
|
else
|
||||||
ENV["CLICOLOR"] = nil
|
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
|
end
|
||||||
elsif args.verbose? || !$stdout.tty?
|
elsif args.verbose? || !$stdout.tty?
|
||||||
system_command! "find", args: ARGV.kegs.map(&:to_s) + %w[-not -type d -print], print_stdout: true
|
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
|
git -C "#{git_cd}" fetch --unshallow
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
args = ARGV.options_only
|
args = Homebrew.args.options_only
|
||||||
args += ["--follow", "--", path] unless path.nil?
|
args += ["--follow", "--", path] unless path.nil?
|
||||||
system "git", "log", *args
|
system "git", "log", *args
|
||||||
end
|
end
|
||||||
|
|||||||
@ -162,7 +162,7 @@ module Homebrew
|
|||||||
tab = Tab.for_keg(keg)
|
tab = Tab.for_keg(keg)
|
||||||
end
|
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 = build_options.used_options
|
||||||
options |= f.build.used_options
|
options |= f.build.used_options
|
||||||
options &= f.options
|
options &= f.options
|
||||||
|
|||||||
@ -82,7 +82,7 @@ module Homebrew
|
|||||||
--
|
--
|
||||||
#{HOMEBREW_LIBRARY_PATH}/test.rb
|
#{HOMEBREW_LIBRARY_PATH}/test.rb
|
||||||
#{f.path}
|
#{f.path}
|
||||||
].concat(ARGV.options_only)
|
].concat(Homebrew.args.options_only)
|
||||||
|
|
||||||
if f.head?
|
if f.head?
|
||||||
args << "--HEAD"
|
args << "--HEAD"
|
||||||
|
|||||||
@ -16,7 +16,7 @@ module Homebrew
|
|||||||
backup keg
|
backup keg
|
||||||
end
|
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 = build_options.used_options
|
||||||
options |= f.build.used_options
|
options |= f.build.used_options
|
||||||
options &= f.options
|
options &= f.options
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user