Use command instead of type to check if brew is already in path

This commit is contained in:
Aaron
2023-02-24 16:51:32 +00:00
parent e67c173403
commit 5613825329

View File

@@ -997,7 +997,7 @@ esac
# show different instructions on adding Homebrew to path based on if the user has already done so
if grep -qs "eval \"\$(${HOMEBREW_PREFIX}/bin/brew shellenv)\"" "${shell_profile}"
then
if ! type brew &>/dev/null
if ! [[ -x "$(command -v brew)" ]]
then
cat <<EOS
- Run this command in your terminal to add Homebrew to your ${tty_bold}PATH${tty_reset}: