From bc2b9d4bf0913114e19d5e37835af9b4ab004614 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sat, 13 May 2017 15:06:13 +0100 Subject: [PATCH] Fix issue with cask from alternative taps This makes sure it correctly detects already installed casks like logitech-options, which during installation needs to be specified as "caskroom/drivers/logitech-options", but is then listed as "logitech-options" on "cask list". --- bin/bootstrap-caskroom | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/bootstrap-caskroom b/bin/bootstrap-caskroom index 7f5e4cc..0752987 100755 --- a/bin/bootstrap-caskroom +++ b/bin/bootstrap-caskroom @@ -100,6 +100,10 @@ installed=( $(brew cask list) ) for pkg in "${pkgs[@]}"; do base=$(echo $pkg | awk '{print $1}') + if [[ "$base" == *\/* ]]; then + base=$(basename "$base") + fi + found="" for i in ${installed[@]}; do