From c9aaeffcbdf268a81765e114dfc33cc6a5c48fb1 Mon Sep 17 00:00:00 2001 From: Tobias Gurtzick Date: Sat, 26 Aug 2017 23:07:26 +0200 Subject: [PATCH] make the path array POSIX compliant --- nvm.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nvm.sh b/nvm.sh index e495ac1..dba4210 100644 --- a/nvm.sh +++ b/nvm.sh @@ -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