File tree 3 files changed +3
-2
lines changed
3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -2112,7 +2112,7 @@ nvm_die_on_prefix() {
2112
2112
if [ -f " ${npmrc} /.npmrc" ]; then
2113
2113
NVM_NPM_PREFIX=$( grep ^prefix= " ${npmrc} " /.npmrc | sed s/prefix=\\\( .* \\\) $/\\ 1/)
2114
2114
if ! [ -z " $NVM_NPM_PREFIX " ]; then
2115
- nvm_err " Incompatible prefix setting prefix=${npmrc } found in the config file ${npmrc} /.npmrc"
2115
+ nvm_err " Incompatible prefix setting prefix=${NVM_NPM_PREFIX } found in the config file ${npmrc} /.npmrc"
2116
2116
break
2117
2117
fi
2118
2118
fi
Original file line number Diff line number Diff line change @@ -63,7 +63,8 @@ sed() {
63
63
echo " ./bad prefix"
64
64
}
65
65
OUTPUT=" $( nvm_die_on_prefix 0 foo 2>&1 ) "
66
- EXPECTED_OUTPUT=" nvm is not compatible with the npm config \" prefix\" option: currently set to \" ./bad prefix\"
66
+ EXPECTED_OUTPUT=" Incompatible prefix setting prefix=./bad prefix found in the config file ./.npmrc
67
+ nvm is not compatible with the npm config \" prefix\" option: currently set to \" ./bad prefix\"
67
68
Run \` npm config delete prefix\` or \` foo\` to unset it."
68
69
EXIT_CODE=" $( nvm_die_on_prefix 0 foo > /dev/null 2>&1 ; echo $? ) "
69
70
[ " _$OUTPUT " = " _$EXPECTED_OUTPUT " ] || die " 'nvm_die_on_prefix 0 foo' did not error with '$EXPECTED_OUTPUT ' with bad prefix set; got '$OUTPUT '"
You can’t perform that action at this time.
0 commit comments