Skip to content
Myr

Merge pull request #950 from kui/commands-includes-spaces

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

[Fix] fix `nvm-exec` for commands including spaces. Relates to #903.

authored by Jordan Harband · committed by Jordan Harband · parents 91ce41b, b76d43e · Browse files · 2 files+3 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+3 added−1 removed

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

2 files+3 added−1 removed

modified:test/slow/nvm exec/Running "nvm exec 0.x" should work+2 added
4 unmodified lines
5. ../../../nvm.sh67nvm use 0.108NPM_VERSION_TEN="$(npm --version)"9TEST_STRING="foo bar"1011nvm use 0.11.7 && [ "$(node --version)" = "v0.11.7" ] || die "\`nvm use\` failed!"1213[ "$(nvm exec 0.10 npm --version | tail -1)" = "$NPM_VERSION_TEN" ] || die "`nvm exec` failed to run with the correct version"1415[ "$(nvm exec 0.10 bash -c "printf '$TEST_STRING'" | tail -1)" = "$TEST_STRING" ] || die "`nvm exec` failed to run with the command include white-spaces"
modified:nvm-exec+1 added-1 removed
8 unmodified lines
9else10 nvm use > /dev/null || (echo "No .nvmrc file found" >&2 && exit 127)11fi1213exec $@13exec "$@"