From 0093b3f5c11ff9f8685c769534f3cc09d89ee72c Mon Sep 17 00:00:00 2001 From: Evangelos Lamprou Date: Tue, 25 Aug 2026 11:32:47 -0400 Subject: [PATCH] Use command -v for Homebrew checks --- android.sh | 2 +- datastores.sh | 4 ++-- web.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/android.sh b/android.sh index a646696b9..d980e8a57 100755 --- a/android.sh +++ b/android.sh @@ -10,7 +10,7 @@ while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & # Check for Homebrew, # Install if we don't have it -if test ! $(which brew); then +if ! command -v brew >/dev/null 2>&1; then echo "Installing homebrew..." ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" fi diff --git a/datastores.sh b/datastores.sh index bc6fb882e..1fe78f372 100755 --- a/datastores.sh +++ b/datastores.sh @@ -10,7 +10,7 @@ while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & # Check for Homebrew, # Install if we don't have it -if test ! $(which brew); then +if ! command -v brew >/dev/null 2>&1; then echo "Installing homebrew..." ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" fi @@ -31,4 +31,4 @@ brew install caskroom/cask/brew-cask brew cask install --appdir="/Applications" mysqlworkbench # Remove outdated versions from the cellar. -brew cleanup \ No newline at end of file +brew cleanup diff --git a/web.sh b/web.sh index dee44602c..b741fb2f3 100755 --- a/web.sh +++ b/web.sh @@ -10,7 +10,7 @@ while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & # Check for Homebrew, # Install if we don't have it -if test ! $(which brew); then +if ! command -v brew >/dev/null 2>&1; then echo "Installing homebrew..." ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" fi