Skip to content
Myr

Make `nvm_resolve_local_alias` not return `N/A` - that should be done as shallowly as possible.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Jordan Harband · committed by Jordan Harband · parent 230b479 · Browse files · 2 files+1 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+1 added−2 removed

  • tests:+1 added−1 removed
  • other:+0 added−1 removed

2 files+1 added−2 removed

modified:test/fast/Aliases/nvm_resolve_local_alias+1 added-1 removed
18 unmodified lines
1920OUTPUT="$(nvm_resolve_local_alias nonexistent)"21EXIT_CODE=$(nvm_resolve_local_alias nonexistent > /dev/null 2>&1 ; echo $?)22[ "_$EXIT_CODE" = "_2" ] || die "'nvm_resolve_local_alias nonexistent' did not return 2; got $EXIT_CODE"23[ "_$OUTPUT" = "_N/A" ] || die "'nvm_resolve_local_alias nonexistent' did not output N/A; got $OUTPUT"23[ "_$OUTPUT" = "_" ] || die "'nvm_resolve_local_alias nonexistent' did not have empty output; got $OUTPUT"2425STABLE="$(nvm_resolve_local_alias stable)"26[ "_$STABLE" = "_v0.0.10" ] || die "'nvm_resolve_local_alias stable' was not v0.0.10; got $STABLE"27
8 unmodified lines
modified:nvm.sh-1 removed
476 unmodified lines
477 local EXIT_CODE478 VERSION="$(nvm_resolve_alias "$1")"479 EXIT_CODE=$?480 if [ -z "$VERSION" ]; then481 echo "N/A"481 return $EXIT_CODE482 fi483 if [ "_$VERSION" != "_∞" ]; then484 nvm_version "$VERSION"
1231 unmodified lines