File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -306,7 +306,7 @@ nvm_detect_profile() {
306
306
if [ -z " $DETECTED_PROFILE " ]; then
307
307
for EACH_PROFILE in " .profile" " .bashrc" " .bash_profile" " .zprofile" " .zshrc"
308
308
do
309
- if DETECTED_PROFILE=" $( nvm_try_profile " ${HOME} /${EACH_PROFILE} " ) " ; then
309
+ if DETECTED_PROFILE=" $( nvm_try_profile " ${ZDOTDIR :- ${ HOME} } /${EACH_PROFILE} " ) " ; then
310
310
break
311
311
fi
312
312
done
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ cleanup () {
23
23
unset -f setup cleanup die
24
24
unset ZDOTDIR
25
25
rm -f " .bashrc" " .bash_profile" " .zprofile" " .zshrc" " .profile" " test_profile" > " /dev/null" 2>&1
26
- rm -rf zdot >&1
26
+ rm -rf zdotdir 2 >&1
27
27
}
28
28
29
29
die () { echo " $@ " ' $NVM_DETECT_PROFILE:' " $NVM_DETECT_PROFILE " ; cleanup; exit 1; }
94
94
#
95
95
96
96
# It should favor .profile if file exists
97
- NVM_DETECT_PROFILE=" $( unset SHELL; nvm_detect_profile) "
97
+ NVM_DETECT_PROFILE=" $( unset SHELL; unset ZDOTDIR ; nvm_detect_profile) "
98
98
if [ " $NVM_DETECT_PROFILE " != " $HOME /.profile" ]; then
99
99
die " nvm_detect_profile should have selected .profile"
100
100
fi
101
101
102
102
# Otherwise, it should favor .bashrc if file exists
103
103
rm " .profile"
104
- NVM_DETECT_PROFILE=" $( unset SHELL; nvm_detect_profile) "
104
+ NVM_DETECT_PROFILE=" $( unset SHELL; unset ZDOTDIR ; nvm_detect_profile) "
105
105
if [ " $NVM_DETECT_PROFILE " != " $HOME /.bashrc" ]; then
106
106
die " nvm_detect_profile should have selected .bashrc"
107
107
fi
108
108
109
109
# Otherwise, it should favor .bash_profile if file exists
110
110
rm " .bashrc"
111
- NVM_DETECT_PROFILE=" $( unset SHELL; nvm_detect_profile) "
111
+ NVM_DETECT_PROFILE=" $( unset SHELL; unset ZDOTDIR ; nvm_detect_profile) "
112
112
if [ " $NVM_DETECT_PROFILE " != " $HOME /.bash_profile" ]; then
113
113
die " nvm_detect_profile should have selected .bash_profile"
114
114
fi
You can’t perform that action at this time.
0 commit comments