mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-09-10 16:49:06 +00:00
[Fix] nvm_die_on_prefix
: filter prefixed env vars on name only, ignoring values
This commit is contained in:

committed by
Jordan Harband

parent
10189bf4cb
commit
93e0070a44
@@ -84,6 +84,9 @@ EXIT_CODE="$(export npm_CONFIG_PREFIX=bar ; nvm_die_on_prefix 0 foo "$(nvm_versi
|
||||
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "'npm_CONFIG_PREFIX=bar nvm_die_on_prefix 0 foo' did not error with '$EXPECTED_OUTPUT'; got '$OUTPUT'"
|
||||
[ "_$EXIT_CODE" = "_4" ] || die "'npm_CONFIG_PREFIX=bar nvm_die_on_prefix 0 foo' did not exit with 4; got '$EXIT_CODE'"
|
||||
|
||||
OUTPUT="$(export FOO='This contains NPM_CONFIG_PREFIX' ; nvm_die_on_prefix 0 foo "$(nvm_version_dir new)" 2>&1)"
|
||||
[ -z "$OUTPUT" ] || die "'nvm_die_on_prefix' was not a noop; got '$OUTPUT'"
|
||||
|
||||
# npmrc tests
|
||||
(
|
||||
cd "${TEST_DIR}"
|
||||
|
Reference in New Issue
Block a user