look in other pathes when the current fails to return a prefix
This commit is contained in:
parent
2e6e512fd5
commit
c7cac323d6
4
nvm.sh
4
nvm.sh
|
|
@ -2112,7 +2112,9 @@ nvm_die_on_prefix() {
|
||||||
for npmrc in "${npmrcs[@]}"; do
|
for npmrc in "${npmrcs[@]}"; do
|
||||||
if [ -f "${npmrc}/.npmrc" ]; then
|
if [ -f "${npmrc}/.npmrc" ]; then
|
||||||
NVM_NPM_PREFIX=$(grep ^prefix= ${npmrc}/.npmrc | sed s/prefix=\\\(.*\\\)$/\\1/)
|
NVM_NPM_PREFIX=$(grep ^prefix= ${npmrc}/.npmrc | sed s/prefix=\\\(.*\\\)$/\\1/)
|
||||||
break
|
if [[ -n $NVM_NPM_PREFIX ]]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue