Revert "[Fix] nvm_die_on_prefix: only grep lines starting with env var name" (#2347)

This reverts commit 21c0c05130.

Fixes #2360. Fixes #2364. Fixes #2366.
This commit is contained in:
Jordan Harband
2020-11-27 21:28:12 -08:00
parent 661a702cdd
commit 3b57dfec8d
2 changed files with 1 additions and 4 deletions

2
nvm.sh
View File

@@ -2352,7 +2352,7 @@ nvm_die_on_prefix() {
# here, we avoid trying to replicate "which one wins" or testing the value; if any are defined, it errors
# until none are left.
local NVM_NPM_CONFIG_PREFIX_ENV
NVM_NPM_CONFIG_PREFIX_ENV="$(command env | nvm_grep -i ^NPM_CONFIG_PREFIX | command tail -1 | command awk -F '=' '{print $1}')"
NVM_NPM_CONFIG_PREFIX_ENV="$(command env | nvm_grep -i NPM_CONFIG_PREFIX | command tail -1 | command awk -F '=' '{print $1}')"
if [ -n "${NVM_NPM_CONFIG_PREFIX_ENV-}" ]; then
local NVM_CONFIG_VALUE
eval "NVM_CONFIG_VALUE=\"\$${NVM_NPM_CONFIG_PREFIX_ENV}\""