From 0cff70b67805f1025cdd3709303191232170fbd5 Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 12 Feb 2015 16:14:13 +0000 Subject: [PATCH] Remove `homebrew-` prefix when checking if repo has already been tapped See: https://github.com/Homebrew/homebrew/blob/master/Library/Homebrew/cmd/tap.rb Example: ``` $ brew tap neovim/homebrew-neovim $ brew tap neovim/neovim ... ``` --- packaging/os/homebrew_tap.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packaging/os/homebrew_tap.py b/packaging/os/homebrew_tap.py index a79ba076a8a..d48a7787b27 100644 --- a/packaging/os/homebrew_tap.py +++ b/packaging/os/homebrew_tap.py @@ -63,8 +63,11 @@ def already_tapped(module, brew_path, tap): brew_path, 'tap', ]) + taps = [tap_.strip().lower() for tap_ in out.split('\n') if tap_] - return tap.lower() in taps + tap_name = re.sub('homebrew-', '', tap.lower()) + + return tap_name in taps def add_tap(module, brew_path, tap):