Skip to content

Commit

Permalink
Preserve original post-install instructions for non-Fish shells
Browse files Browse the repository at this point in the history
Follow-up to
#881 (review).
  • Loading branch information
ZhongRuoyu committed Sep 26, 2024
1 parent 07d7f05 commit ae156f6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1046,11 +1046,20 @@ then
EOS
fi
else
cat <<EOS
if [[ "${SHELL}" == *"/fish"* ]]
then
cat <<EOS
- Run these two commands in your terminal to add Homebrew to your ${tty_bold}PATH${tty_reset}:
printf '%s\n' '' 'eval "\$(${HOMEBREW_PREFIX}/bin/brew shellenv)"' >> ${shell_rcfile}
eval "\$(${HOMEBREW_PREFIX}/bin/brew shellenv)"
EOS
else
cat <<EOS
- Run these two commands in your terminal to add Homebrew to your ${tty_bold}PATH${tty_reset}:
(echo; echo 'eval "\$(${HOMEBREW_PREFIX}/bin/brew shellenv)"') >> ${shell_rcfile}
eval "\$(${HOMEBREW_PREFIX}/bin/brew shellenv)"
EOS
fi
fi

if [[ -n "${non_default_repos}" ]]
Expand Down

0 comments on commit ae156f6

Please sign in to comment.