Skip to content

Commit

Permalink
extract: fix tap regex
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus authored and jonchang committed Nov 10, 2020
1 parent 8b1aaa9 commit 52de3f9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Library/Homebrew/dev-cmd/extract.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ def extract_args
def extract
args = extract_args.parse

if args.named.first =~ HOMEBREW_TAP_FORMULA_REGEX
name = Regexp.last_match(3).downcase
source_tap = Tap.fetch(Regexp.last_match(1), Regexp.last_match(2))
if (match = args.named.first.match(HOMEBREW_TAP_FORMULA_REGEX))
name = match[3].downcase
source_tap = Tap.fetch(match[1], match[2])
raise TapFormulaUnavailableError.new(source_tap, name) unless source_tap.installed?
else
name = args.named.first.downcase
Expand Down

0 comments on commit 52de3f9

Please sign in to comment.