cmd/install: fix installing tap formulae with options.

Fixes #6242.
This commit is contained in:
Mike McQuaid 2019-07-25 21:20:49 +01:00
parent c8e321c329
commit 653b82a720
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -93,6 +93,14 @@ module Homebrew
end end
def install def install
ARGV.named.each do |name|
next if File.exist?(name)
next if name !~ HOMEBREW_TAP_FORMULA_REGEX && name !~ HOMEBREW_CASK_TAP_CASK_REGEX
tap = Tap.fetch(Regexp.last_match(1), Regexp.last_match(2))
tap.install unless tap.installed?
end
install_args.parse install_args.parse
raise FormulaUnspecifiedError if args.remaining.empty? raise FormulaUnspecifiedError if args.remaining.empty?
@ -105,16 +113,6 @@ module Homebrew
EOS EOS
end end
unless args.force?
ARGV.named.each do |name|
next if File.exist?(name)
next if name !~ HOMEBREW_TAP_FORMULA_REGEX && name !~ HOMEBREW_CASK_TAP_CASK_REGEX
tap = Tap.fetch(Regexp.last_match(1), Regexp.last_match(2))
tap.install unless tap.installed?
end
end
formulae = [] formulae = []
unless ARGV.casks.empty? unless ARGV.casks.empty?