Skip to content

Commit

Permalink
fix detect_profile test
Browse files Browse the repository at this point in the history
  • Loading branch information
maxmaxme committed Oct 8, 2022
1 parent 76bc94b commit 7421620
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/install_script/nvm_detect_profile
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,18 @@ fi
# Otherwise, it should favor .zshrc if file exists
rm ".bash_profile"
NVM_DETECT_PROFILE="$(unset SHELL; nvm_detect_profile)"
if [ "$NVM_DETECT_PROFILE" != "$HOME/.zshrc" ]; then
die "nvm_detect_profile should have selected .zshrc"
fi

# Otherwise, it should favor .zprofile if file exists
rm ".zshrc"
NVM_DETECT_PROFILE="$(unset SHELL; nvm_detect_profile)"
if [ "$NVM_DETECT_PROFILE" != "$HOME/.zprofile" ]; then
die "nvm_detect_profile should have selected .zprofile"
fi

# It should be empty if none is found
rm ".zprofile"
NVM_DETECT_PROFILE="$(unset SHELL; nvm_detect_profile)"
if [ "$NVM_DETECT_PROFILE" != "$HOME/.zshrc" ]; then
die "nvm_detect_profile should have selected .zshrc"
fi

# Otherwise, it should favor .zprofile if file exists
rm ".zshrc"
NVM_DETECT_PROFILE="$(unset SHELL; nvm_detect_profile)"
if [ ! -z "$NVM_DETECT_PROFILE" ]; then
Expand Down

0 comments on commit 7421620

Please sign in to comment.