mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-09-10 08:39:07 +00:00
npm version: shell compatibility, test update
* Update test string that checks printed node version to pass with additional npm version display * Remove echo -n for compatibility with shells that do not support it
This commit is contained in:
@@ -5,7 +5,7 @@ die () { echo $@ ; exit 1; }
|
||||
. ../../nvm.sh
|
||||
|
||||
nvm_has_system_node() { return 0; }
|
||||
[ "$(nvm use system 2>&1 | tail -n1)" = "Now using system version of node: $(node -v)." ] || die "Could not use system version of node"
|
||||
[ "$(nvm use system 2>&1 | tail -n1)" = "Now using system version of node: $(node -v) (npm v$(npm -v))" ] || die "Could not use system version of node"
|
||||
|
||||
nvm_has_system_node() { return 1; }
|
||||
[ "$(nvm use system 2>&1 | tail -n1)" = "System version of node not found." ] || die "Did not report error, system node not found"
|
||||
|
Reference in New Issue
Block a user