From 653b82a7202539302b764a6a099d9f6fc5c10e3c Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 25 Jul 2019 21:20:49 +0100 Subject: [PATCH] cmd/install: fix installing tap formulae with options. Fixes #6242. --- Library/Homebrew/cmd/install.rb | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index c13e8be978..e22603a0a4 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -93,6 +93,14 @@ module Homebrew end 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 raise FormulaUnspecifiedError if args.remaining.empty? @@ -105,16 +113,6 @@ module Homebrew EOS 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 = [] unless ARGV.casks.empty?