Merge c1064550872bfc16afe02ec6edeb73ff3847a3da into 4beab63631764fc381a0e56273faf8d43b8f9509

This commit is contained in:
Steven Dee (Jōshin) 2024-08-07 09:39:57 +00:00 committed by GitHub
commit 932debb520
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -40,7 +40,7 @@ nvm_profile_is_bash_or_zsh() {
local TEST_PROFILE local TEST_PROFILE
TEST_PROFILE="${1-}" TEST_PROFILE="${1-}"
case "${TEST_PROFILE-}" in case "${TEST_PROFILE-}" in
*"/.bashrc" | *"/.bash_profile" | *"/.zshrc" | *"/.zprofile") *"/.bashrc" | *"/.bash_profile" | *"/.zshenv" | *"/.zshrc" | *"/.zprofile")
return return
;; ;;
*) *)
@ -300,11 +300,13 @@ nvm_detect_profile() {
DETECTED_PROFILE="$HOME/.zshrc" DETECTED_PROFILE="$HOME/.zshrc"
elif [ -f "$HOME/.zprofile" ]; then elif [ -f "$HOME/.zprofile" ]; then
DETECTED_PROFILE="$HOME/.zprofile" DETECTED_PROFILE="$HOME/.zprofile"
elif [ -f "$HOME/.zshenv" ]; then
DETECTED_PROFILE="$HOME/.zshenv"
fi fi
fi fi
if [ -z "$DETECTED_PROFILE" ]; then if [ -z "$DETECTED_PROFILE" ]; then
for EACH_PROFILE in ".profile" ".bashrc" ".bash_profile" ".zprofile" ".zshrc" for EACH_PROFILE in ".profile" ".bashrc" ".bash_profile" ".zprofile" ".zshrc" ".zshenv"
do do
if DETECTED_PROFILE="$(nvm_try_profile "${HOME}/${EACH_PROFILE}")"; then if DETECTED_PROFILE="$(nvm_try_profile "${HOME}/${EACH_PROFILE}")"; then
break break