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 1408cbc
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 @@ -102,18 +102,18 @@ if [ "$NVM_DETECT_PROFILE" != "$HOME/.bash_profile" ]; then
die "nvm_detect_profile should have selected .bash_profile"
fi

# Otherwise, it should favor .zshrc if file exists
# Otherwise, it should favor .zprofile 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"
if [ "$NVM_DETECT_PROFILE" != "$HOME/.zprofile" ]; then
die "nvm_detect_profile should have selected .zprofile"
fi

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

# It should be empty if none is found
Expand Down

0 comments on commit 1408cbc

Please sign in to comment.