Skip to content

Commit

Permalink
fix(brew): support brew v3+ (#18)
Browse files Browse the repository at this point in the history
* fix(brew): support brew v3+

* fix(brew): brew list for casks was wrong
  • Loading branch information
dance-cmdr authored Jan 31, 2022
1 parent acc14d2 commit c589c3d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dependencies/brew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ install_brew() {
}

install_cask() {
if [[ ! $(brew cask list | grep $1) ]]; then
if [[ ! $(brew list --cask | grep $1) ]]; then
print_info "Installing $1"
brew cask install $1 --appdir=/Applications >/dev/null
print_success "${bold} ✓ installed. ${normal}"
brew install --cask $1 --appdir=/Applications >/dev/null
print_success "${bold} ✓ installed. $1 ${normal}"
else
print_success "$1 already installed."
fi
}

tap_cask() {
if [[ ! $(brew cask list | grep $1) ]]; then
if [[ ! $(brew list --cask| grep $1) ]]; then
print_info "Tapping cask $1"
brew tap $1 >/dev/null
print_success "${bold} ✓ tapped. ${normal}"
Expand All @@ -67,6 +67,6 @@ install_brew_packages(){
done

else
print_error "Pagackes file not found"
print_error "Pacage file not found"
fi
}

0 comments on commit c589c3d

Please sign in to comment.