fix(install): name the profile the user's shell actually reads
prd-number-check / require-numbered-prds (pull_request) Successful in 11s
tracker-policy-pr / check-pr (pull_request) Successful in 9s
test / image-input-builds (pull_request) Successful in 38s
test / unit (pull_request) Successful in 43s
test / integration-docker (pull_request) Successful in 59s
test / coverage (pull_request) Successful in 16s
prd-number-check / require-numbered-prds (pull_request) Successful in 11s
tracker-policy-pr / check-pr (pull_request) Successful in 9s
test / image-input-builds (pull_request) Successful in 38s
test / unit (pull_request) Successful in 43s
test / integration-docker (pull_request) Successful in 59s
test / coverage (pull_request) Successful in 16s
The PATH hint hardcoded ~/.zprofile, which is right for macOS's zsh and wrong for the Linux users this installer also serves. Pick from $SHELL instead. ~/.profile is the default for non-zsh rather than ~/.bash_profile, because creating the latter would shadow an existing ~/.profile. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WEfZZhakx13bxTfXcZCoS5
This commit is contained in:
+8
-1
@@ -179,8 +179,15 @@ if command -v bot-bottle >/dev/null 2>&1; then
|
||||
BOT_BOTTLE_BIN="bot-bottle"
|
||||
elif [ -x "${BIN_DIR}/bot-bottle" ]; then
|
||||
BOT_BOTTLE_BIN="${BIN_DIR}/bot-bottle"
|
||||
# Name the file the user's own login shell actually reads. ~/.profile is
|
||||
# the safe default for non-zsh: bash falls back to it, and suggesting
|
||||
# ~/.bash_profile could shadow an existing ~/.profile.
|
||||
case "${SHELL:-}" in
|
||||
*/zsh) profile="~/.zprofile" ;;
|
||||
*) profile="~/.profile" ;;
|
||||
esac
|
||||
say "note: add ${BIN_DIR} to your PATH to run 'bot-bottle' directly:"
|
||||
say " echo 'export PATH=\"${BIN_DIR}:\$PATH\"' >> ~/.zprofile"
|
||||
say " echo 'export PATH=\"${BIN_DIR}:\$PATH\"' >> ${profile}"
|
||||
else
|
||||
die "bot-bottle was installed but no entry point turned up in ${BIN_DIR}"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user