diff --git a/scripts/homebrew.sh b/scripts/homebrew.sh index 30a467f6..a6f972da 100644 --- a/scripts/homebrew.sh +++ b/scripts/homebrew.sh @@ -219,8 +219,10 @@ ensurePackageManagerHomebrew() { ### Ensures gcc is installed ensureGcc() { - if command -v brew > /dev/null; then - if ! brew list | grep gcc > /dev/null; then + # Eval homebrew before checking if gcc is installed + loadHomebrew + if command -v brew >/dev/null; then + if ! brew list | grep gcc >/dev/null; then logg info 'Installing Homebrew gcc' && brew install --quiet gcc else logg info 'Homebrew gcc is available'