mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-08-16 10:43:42 +00:00
Merge 50694cb1f3817ac36348c9df08ca01a61f36d602 into 762f9ef9d17623b45095e8ca1a996c8928f3f424
This commit is contained in:
commit
f91846635c
@ -40,7 +40,7 @@ nvm_profile_is_bash_or_zsh() {
|
||||
local TEST_PROFILE
|
||||
TEST_PROFILE="${1-}"
|
||||
case "${TEST_PROFILE-}" in
|
||||
*"/.bashrc" | *"/.bash_profile" | *"/.zshrc" | *"/.zprofile")
|
||||
*"/.bashrc" | *"/.bash_profile" | *"/.zshenv" | *"/.zshrc" | *"/.zprofile")
|
||||
return
|
||||
;;
|
||||
*)
|
||||
@ -300,11 +300,13 @@ nvm_detect_profile() {
|
||||
DETECTED_PROFILE="$HOME/.zshrc"
|
||||
elif [ -f "$HOME/.zprofile" ]; then
|
||||
DETECTED_PROFILE="$HOME/.zprofile"
|
||||
elif [ -f "$HOME/.zshenv" ]; then
|
||||
DETECTED_PROFILE="$HOME/.zshenv"
|
||||
fi
|
||||
fi
|
||||
|
||||
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
|
||||
if DETECTED_PROFILE="$(nvm_try_profile "${HOME}/${EACH_PROFILE}")"; then
|
||||
break
|
||||
|
Loading…
x
Reference in New Issue
Block a user