From 11d71ab24b3b138dfc5b64f4183245ed89b81a64 Mon Sep 17 00:00:00 2001 From: Axel Svensson Date: Fri, 24 Sep 2021 01:56:47 +0200 Subject: [PATCH] [Fix] Regression in 2dad045 Fixes #2599 --- nvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index f646107..297f5ff 100644 --- a/nvm.sh +++ b/nvm.sh @@ -2458,7 +2458,7 @@ nvm_die_on_prefix() { # until none are left. local NVM_NPM_CONFIG_x_PREFIX_ENV if [ -n "${BASH_SOURCE-}" ]; then - NVM_NPM_CONFIG_x_PREFIX_ENV="$(command set | command awk -F '=' '! /^[0-9A-Z_a-z]+=/ {exit} {print $1}' | nvm_grep -i NPM_CONFIG_PREFIX | command tail -1)" + NVM_NPM_CONFIG_x_PREFIX_ENV="$(command set | command awk -F '=' '! /^[0-9A-Z_a-z]+=/ {skip=1} skip==0 {print $1}' | nvm_grep -i NPM_CONFIG_PREFIX | command tail -1)" else NVM_NPM_CONFIG_x_PREFIX_ENV="$(command env | nvm_grep -i NPM_CONFIG_PREFIX | command tail -1 | command awk -F '=' '{print $1}')" fi