feat: 优化mx环境变量提示

This commit is contained in:
neo 2023-03-09 17:00:53 +08:00
parent 40828fec78
commit 3a766fef0c

View File

@ -1127,16 +1127,18 @@ EOS
" "
fi fi
if [[ ":${PATH}:" != *":${HOMEBREW_PREFIX}/bin:"* ]] if [[ "$(which brew)" != "${HOMEBREW_PREFIX}/bin/brew" ]]
then then
eval "\$(${HOMEBREW_PREFIX}/bin/brew shellenv)"
echo "" echo ""
warn " 重要 " warn "重要信息 for Apple M1/M2系列用户"
warn "$(
cat <<EOS cat <<EOS
如果遇到 command not found brew请执行下面脚本完成安装: 如果遇到 ${tty_red}command not found brew${tty_reset},请执行下面脚本完成安装:
eval "\$(${HOMEBREW_PREFIX}/bin/brew shellenv)" ${tty_blue}eval "\$(${HOMEBREW_PREFIX}/bin/brew shellenv)"
EOS EOS
)
"
fi fi
if [[ -n "${HOMEBREW_ON_LINUX-}" ]] if [[ -n "${HOMEBREW_ON_LINUX-}" ]]