/
home
/
techb158
/
.nvm
/
test
/
sourcing
/
/home/techb158/.nvm/test/sourcing
mkdir
upload
Name
Size
Mode
Actions
setup
373
0775
edit
dl
rm
Sourcing nvm.sh global alias bug
863
0775
edit
dl
rm
Sourcing nvm.sh should keep version if one is active
592
0775
edit
dl
rm
Sourcing nvm.sh should use the default if available and no nvm node is loaded
1154
0775
edit
dl
rm
Sourcing nvm.sh with --install and .nvmrc should install it
850
0775
edit
dl
rm
Sourcing nvm.sh with --install should install the default
1029
0775
edit
dl
rm
Sourcing nvm.sh with --no-use should not use anything
992
0775
edit
dl
rm
Sourcing nvm.sh with no default should return 0
314
0775
edit
dl
rm
teardown
112
0775
edit
dl
rm
Edit:
/home/techb158/.nvm/test/sourcing/Sourcing nvm.sh with --no-use should not use anything
(992B)
#!/bin/sh die () { echo "$@" ; exit 1; } supports_source_options () { [ "_$(echo 'echo $1' | . /dev/stdin yes)" = "_yes" ] } if ! supports_source_options; then echo 'this shell does not support passing options on sourcing' exit 0; fi \. ../../nvm.sh nvm install 4.1.0 || die 'install of v4.1.0 failed' nvm_version 4.1.0 >/dev/null 2>&1 || die "v4.1.0 not installed: $(nvm ls)" nvm deactivate || die 'nvm deactivate failed' NVM_CURRENT="$(nvm current)" [ "_$NVM_CURRENT" = '_none' ] || [ "_$NVM_CURRENT" = '_system' ] || die "'nvm current' did not return 'none' or 'system', got '$NVM_CURRENT' `nvm ls`" nvm unload || die 'nvm unload failed' \. ../../nvm.sh --no-use EXIT_CODE="$(echo $?)" echo 'sourcing complete.' [ "_$EXIT_CODE" = "_0" ] || die "sourcing returned nonzero exit code: $EXIT_CODE" NVM_CURRENT="$(nvm current)" [ "_$NVM_CURRENT" = '_none' ] || [ "_$NVM_CURRENT" = '_system' ] || die "'nvm current' did not return 'none' or 'system', got '$NVM_CURRENT' `nvm ls`"
Save
cmd:
run