Skip to content

Commit

Permalink
Check for PATH updates after install of homebrew
Browse files Browse the repository at this point in the history
  • Loading branch information
kalomaze committed Jul 27, 2023
1 parent 3295f32 commit ddd8082
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,18 @@ fi
if ! command -v brew &> /dev/null; then
echo "Homebrew still not found. Attempting to install..."
/bin/bash -c "$(curl -fsSL https://github.com/Homebrew/install/HEAD/install.sh)"

# Check again if Homebrew is in PATH
if ! command -v brew &> /dev/null; then
echo "Homebrew not found in PATH even after installation. Checking common paths again..."
for path in "${BREW_PATHS[@]}"; do
if [[ -x "$path/brew" ]]; then
echo "Found post-install homebrew, adding to PATH...."
add_to_path "$path"
break
fi
done
fi
fi

# Verifying if Homebrew has been installed successfully
Expand Down

0 comments on commit ddd8082

Please sign in to comment.