make the path array POSIX compliant

This commit is contained in:
Tobias Gurtzick 2017-08-26 23:07:26 +02:00
parent c7cac323d6
commit c9aaeffcbd
No known key found for this signature in database
GPG Key ID: 6C56E4E3D2EAC901

5
nvm.sh
View File

@ -2106,10 +2106,9 @@ nvm_die_on_prefix() {
fi
local NVM_NPM_PREFIX
local npmrcs=". $HOME"
declare -a npmrcs=("." "$HOME")
for npmrc in "${npmrcs[@]}"; do
for npmrc in $npmrcs; do
if [ -f "${npmrc}/.npmrc" ]; then
NVM_NPM_PREFIX=$(grep ^prefix= ${npmrc}/.npmrc | sed s/prefix=\\\(.*\\\)$/\\1/)
if [[ -n $NVM_NPM_PREFIX ]]; then