Skip to content
Myr

When no arguments are passed to `nvm run X`, use `nvm exec` to open a REPL.

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

Fixes #625. Tests will be in #717.

authored by Jordan Harband · committed by Jordan Harband · parent c966204 · Browse files · 2 files+7 added−1 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+7 added−1 removed

  • other:+7 added−1 removed

2 files+7 added−1 removed

modified:nvm-exec-1 removed
9 unmodified lines
10 nvm use > /dev/null || (echo "No .nvmrc file found" >&2 && exit 127)11fi1213exec $@14
modified:nvm.sh+7 added
1449 unmodified lines
1450 fi1451 if [ "_$VERSION" = "_N/A" ]; then1452 echo "$(nvm_ensure_version_prefix "$provided_version") is not installed yet" >&21453 EXIT_CODE=11454 elif [ -z "$ARGS" ]; then1455 if [ "$NVM_IOJS" = true ]; then1456 nvm exec "$VERSION" iojs1457 else1458 nvm exec "$VERSION" node1459 fi1460 EXIT_CODE="$?"1461 elif [ "$NVM_IOJS" = true ]; then1462 echo "Running io.js $(nvm_strip_iojs_prefix "$VERSION")"1463 OUTPUT="$(nvm use "$VERSION" >/dev/null && iojs $ARGS)"1464 EXIT_CODE="$?"
284 unmodified lines