Remove useless trailing newlines

Peter Dave Hello 2018-02-26 01:01:30 +08:00
parent f3076d14c9
commit 2cd2c0f72e
60 changed files with 0 additions and 63 deletions

View File

@ -14,4 +14,3 @@ npm-debug.log
.DS_Store .DS_Store
current current

1
.gitattributes vendored
View File

@ -1,2 +1 @@
* eol=lf * eol=lf

View File

@ -17,4 +17,3 @@ For pull requests:
Even if you don't have all of these items covered, please still feel free to submit a PR/issue! Someone else may be inspired and volunteer to complete it for you. Even if you don't have all of these items covered, please still feel free to submit a PR/issue! Someone else may be inspired and volunteer to complete it for you.
Thanks again! Thanks again!

View File

@ -106,4 +106,3 @@ RUN bash -c 'source $HOME/.nvm/nvm.sh && \
WORKDIR /home/nvm/.nvm WORKDIR /home/nvm/.nvm
ENTRYPOINT /bin/bash ENTRYPOINT /bin/bash

View File

@ -18,4 +18,3 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -95,4 +95,3 @@ if [[ -n ${ZSH_VERSION-} ]]; then
fi fi
complete -o default -F __nvm nvm complete -o default -F __nvm nvm

View File

@ -24,4 +24,3 @@ EXPECTED_OUTPUT="Aliases in subdirectories are not supported."
EXIT_CODE="$(nvm alias /bar baz >/dev/null 2>&1 ; echo $?)" EXIT_CODE="$(nvm alias /bar baz >/dev/null 2>&1 ; echo $?)"
[ "$EXIT_CODE" = "1" ] || die "trying to create an alias starting with a slash should fail with code 1, got '$EXIT_CODE'" [ "$EXIT_CODE" = "1" ] || die "trying to create an alias starting with a slash should fail with code 1, got '$EXIT_CODE'"

View File

@ -24,4 +24,3 @@ EXPECTED_OUTPUT="Aliases in subdirectories are not supported."
EXIT_CODE="$(nvm unalias /bar >/dev/null 2>&1 ; echo $?)" EXIT_CODE="$(nvm unalias /bar >/dev/null 2>&1 ; echo $?)"
[ "$EXIT_CODE" = "1" ] || die "trying to remove an alias starting with a slash should fail with code 1, got '$EXIT_CODE'" [ "$EXIT_CODE" = "1" ] || die "trying to remove an alias starting with a slash should fail with code 1, got '$EXIT_CODE'"

View File

@ -24,4 +24,3 @@ EXPECTED_IOJS="$(nvm_print_implicit_alias local iojs)"
IOJS_VERSION="$(nvm_version "$EXPECTED_IOJS")" IOJS_VERSION="$(nvm_version "$EXPECTED_IOJS")"
echo "$NVM_ALIAS_OUTPUT" | \grep -F "iojs -> $EXPECTED_IOJS (-> $IOJS_VERSION) (default)" \ echo "$NVM_ALIAS_OUTPUT" | \grep -F "iojs -> $EXPECTED_IOJS (-> $IOJS_VERSION) (default)" \
|| die "nvm alias did not contain the default local iojs version; got '$NVM_ALIAS_OUTPUT'" || die "nvm alias did not contain the default local iojs version; got '$NVM_ALIAS_OUTPUT'"

View File

@ -7,4 +7,3 @@ echo three > ../../../../alias/two
echo one > ../../../../alias/three echo one > ../../../../alias/three
echo two > ../../../../alias/four echo two > ../../../../alias/four

View File

@ -7,4 +7,3 @@ rm -f ../../../../alias/two
rm -f ../../../../alias/three rm -f ../../../../alias/three
rm -f ../../../../alias/four rm -f ../../../../alias/four

View File

@ -14,4 +14,3 @@ rmdir ../../../versions >/dev/null 2>&1
unalias nvm_has_system_node >/dev/null 2>&1 unalias nvm_has_system_node >/dev/null 2>&1
rm -f ../../../alias/stable >/dev/null 2>&1 rm -f ../../../alias/stable >/dev/null 2>&1
rm -f ../../../alias/unstable >/dev/null 2>&1 rm -f ../../../alias/unstable >/dev/null 2>&1

View File

@ -30,4 +30,3 @@ OUTPUT="$(nvm_alias test)"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "'nvm_alias test' produced wrong output; got $OUTPUT" [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "'nvm_alias test' produced wrong output; got $OUTPUT"
cleanup cleanup

View File

@ -5,4 +5,3 @@ die () { echo "$@" ; exit 1; }
\. ../../../nvm.sh \. ../../../nvm.sh
[ "_$(nvm_alias_path)" = "_$NVM_DIR/alias" ] || die "nvm_alias_path did not requrn correct location" [ "_$(nvm_alias_path)" = "_$NVM_DIR/alias" ] || die "nvm_alias_path did not requrn correct location"

View File

@ -23,4 +23,3 @@ TEST_DIR="$PWD"
[ "~$(PWD=$TEST_DIR/tmp_nvm_find_up/a/b/c/d nvm_find_up 'test')" = "~$TEST_DIR/tmp_nvm_find_up/a/b/c" ] || die "failed to find 1 level up from current dir" [ "~$(PWD=$TEST_DIR/tmp_nvm_find_up/a/b/c/d nvm_find_up 'test')" = "~$TEST_DIR/tmp_nvm_find_up/a/b/c" ] || die "failed to find 1 level up from current dir"
cleanup cleanup

View File

@ -18,4 +18,3 @@ INPUT="1.2.3.4.5"
OUTPUT="$(nvm_format_version "$INPUT")" OUTPUT="$(nvm_format_version "$INPUT")"
EXPECTED_OUTPUT="v1.2.3" EXPECTED_OUTPUT="v1.2.3"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_format_version $INPUT did not return $EXPECTED_OUTPUT; got $OUTPUT" [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_format_version $INPUT did not return $EXPECTED_OUTPUT; got $OUTPUT"

View File

@ -9,4 +9,3 @@ nvm_has cat && type cat > /dev/null || die 'nvm_has locates "cat" properly'
[ "~$(nvm_has foobarbaz 2>&1)" = "~" ] || die "nvm_has does not suppress error output" [ "~$(nvm_has foobarbaz 2>&1)" = "~" ] || die "nvm_has does not suppress error output"
! nvm_has foobarbaz && ! type foobarbaz >/dev/null 2>&1 || die "nvm_has does not return a nonzero exit code when not found" ! nvm_has foobarbaz && ! type foobarbaz >/dev/null 2>&1 || die "nvm_has does not return a nonzero exit code when not found"

View File

@ -35,4 +35,3 @@ iojs-v1.0.4"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_ls_remote_iojs 1.0 did not output 1.0.x versions; got $OUTPUT" [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_ls_remote_iojs 1.0 did not output 1.0.x versions; got $OUTPUT"
cleanup cleanup

View File

@ -22,4 +22,3 @@ die () { echo "$@" ; exit 1; }
[ "~$(nvm_num_version_groups 1.2.3)" = "~3" ] || die "1.2.3 should give 3" [ "~$(nvm_num_version_groups 1.2.3)" = "~3" ] || die "1.2.3 should give 3"
[ "~$(nvm_num_version_groups v1.2.3)" = "~3" ] || die "v1.2.3 should give 3" [ "~$(nvm_num_version_groups v1.2.3)" = "~3" ] || die "v1.2.3 should give 3"
[ "~$(nvm_num_version_groups v1.2.3.)" = "~3" ] || die "v1.2.3. should give 3" [ "~$(nvm_num_version_groups v1.2.3.)" = "~3" ] || die "v1.2.3. should give 3"

View File

@ -23,4 +23,3 @@ EXPECTED_SECOND_MSG="Only implicit aliases 'stable', 'unstable', 'iojs', and 'no
SECOND_EXIT_CODE="$(nvm_print_implicit_alias local > /dev/null 2>&1 ; echo $?)" SECOND_EXIT_CODE="$(nvm_print_implicit_alias local > /dev/null 2>&1 ; echo $?)"
[ "_$SECOND_EXIT_CODE" = "_2" ] \ [ "_$SECOND_EXIT_CODE" = "_2" ] \
|| die "nvm_print_implicit_alias without stable|unstable|iojs|node had wrong exit code: expected 2, got $SECOND_EXIT_CODE" || die "nvm_print_implicit_alias without stable|unstable|iojs|node had wrong exit code: expected 2, got $SECOND_EXIT_CODE"

View File

@ -75,4 +75,3 @@ EXIT_CODE="$(nvm_remote_versions iojs >/dev/null 2>&1 ; echo $?)"
[ "_$EXIT_CODE" = "_0" ] || die "nvm_remote_versions iojs did not exit with 0, got $EXIT_CODE" [ "_$EXIT_CODE" = "_0" ] || die "nvm_remote_versions iojs did not exit with 0, got $EXIT_CODE"
cleanup cleanup

View File

@ -29,4 +29,3 @@ nvm_tree_contains_path tmp2 tmp2/node || die '"tmp2" should contain "tmp2/node"'
nvm_tree_contains_path tmp2 tmp/node && die '"tmp2" should not contain "tmp/node"' nvm_tree_contains_path tmp2 tmp/node && die '"tmp2" should not contain "tmp/node"'
cleanup cleanup

View File

@ -18,4 +18,3 @@ nvm_validate_implicit_alias stable || die "nvm_validate_implicit_alias stable di
nvm_validate_implicit_alias unstable || die "nvm_validate_implicit_alias unstable did not exit 0" nvm_validate_implicit_alias unstable || die "nvm_validate_implicit_alias unstable did not exit 0"
nvm_validate_implicit_alias node || die "nvm_validate_implicit_alias node did not exit 0" nvm_validate_implicit_alias node || die "nvm_validate_implicit_alias node did not exit 0"
nvm_validate_implicit_alias iojs || die "nvm_validate_implicit_alias iojs did not exit 0" nvm_validate_implicit_alias iojs || die "nvm_validate_implicit_alias iojs did not exit 0"

View File

@ -9,4 +9,3 @@ die () { echo "$@" ; exit 1; }
[ "$(nvm_version_dir new)" = "$(nvm_version_dir)" ] || die '"nvm_version_dir new" did not return new dir path' [ "$(nvm_version_dir new)" = "$(nvm_version_dir)" ] || die '"nvm_version_dir new" did not return new dir path'
[ "$(nvm_version_dir old)" = "$NVM_DIR" ] || die '"nvm_version_dir old" did not return old dir path' [ "$(nvm_version_dir old)" = "$NVM_DIR" ] || die '"nvm_version_dir old" did not return old dir path'
[ "$(nvm_version_dir foo 2>&1)" = "unknown version dir" ] || die '"nvm_version_dir foo" did not error out' [ "$(nvm_version_dir foo 2>&1)" = "unknown version dir" ] || die '"nvm_version_dir foo" did not error out'

View File

@ -13,4 +13,3 @@ fi
if nvm_version_greater 0.10.0 0.10.0; then if nvm_version_greater 0.10.0 0.10.0; then
die '"nvm_version_greater" returned false for the same two versions' die '"nvm_version_greater" returned false for the same two versions'
fi fi

View File

@ -12,4 +12,3 @@ EXPECTED_OUTPUT="$NVM_DIR/foo"
[ "$(nvm_version_path v0.11.0)" = "$NVM_DIR/v0.11.0" ] || die 'old version has the wrong path' [ "$(nvm_version_path v0.11.0)" = "$NVM_DIR/v0.11.0" ] || die 'old version has the wrong path'
[ "$(nvm_version_path v0.12.0)" = "$NVM_DIR/versions/node/v0.12.0" ] || die 'new version has the wrong path' [ "$(nvm_version_path v0.12.0)" = "$NVM_DIR/versions/node/v0.12.0" ] || die 'new version has the wrong path'
[ "$(nvm_version_path iojs-v0.12.0)" = "$NVM_DIR/versions/io.js/v0.12.0" ] || die 'iojs version has the wrong path' [ "$(nvm_version_path iojs-v0.12.0)" = "$NVM_DIR/versions/io.js/v0.12.0" ] || die 'iojs version has the wrong path'

View File

@ -6,4 +6,3 @@ NVM_ENV=testing \. ../../install.sh
#nvm_do_install is available #nvm_do_install is available
type nvm_do_install > /dev/null 2>&1 || die 'nvm_do_install is not available' type nvm_do_install > /dev/null 2>&1 || die 'nvm_do_install is not available'

View File

@ -22,4 +22,3 @@ install_dir=$(nvm_install_dir)
[ "_$install_dir" = "_$HOME/.nvm" ] || die "nvm_install_dir should default to \$HOME/.nvm. Current output: $install_dir" [ "_$install_dir" = "_$HOME/.nvm" ] || die "nvm_install_dir should default to \$HOME/.nvm. Current output: $install_dir"
cleanup cleanup

View File

@ -20,4 +20,3 @@ nvm_do_install > /dev/null 2>&1
command -v nvm || die 'nvm could not be loaded' command -v nvm || die 'nvm could not be loaded'
cleanup cleanup

View File

@ -36,4 +36,3 @@ nvm_reset || die 'nvm_reset failed'
! safe_type nvm_detect_profile || die 'nvm_detect_profile is still available' ! safe_type nvm_detect_profile || die 'nvm_detect_profile is still available'
cleanup cleanup

View File

@ -37,4 +37,3 @@ out=$(nvm_source "anything")
[ "_$out" = "_my_location" ] || die "nvm_source script should have returned \$NVM_SOURCE. Got \"$out\"" [ "_$out" = "_my_location" ] || die "nvm_source script should have returned \$NVM_SOURCE. Got \"$out\""
cleanup cleanup

View File

@ -3,4 +3,3 @@
if [ -f ".nvmrc" ]; then if [ -f ".nvmrc" ]; then
mv .nvmrc .nvmrc.bak mv .nvmrc .nvmrc.bak
fi fi

View File

@ -14,4 +14,3 @@ fi
if [ -f ".nvmrc.bak" ]; then if [ -f ".nvmrc.bak" ]; then
mv .nvmrc.bak .nvmrc mv .nvmrc.bak .nvmrc
fi fi

View File

@ -21,4 +21,3 @@ nvm install $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed"
# Check # Check
[ -d ../../$NVM_TEST_VERSION ] [ -d ../../$NVM_TEST_VERSION ]
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed" nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"

View File

@ -37,5 +37,3 @@ ${USE_OUTPUT}
failed" failed"
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "expected >${EXPECTED_OUTPUT}<; got >${OUTPUT}<" [ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "expected >${EXPECTED_OUTPUT}<; got >${OUTPUT}<"

View File

@ -18,5 +18,3 @@ nvm install || die "'nvm install' failed"
[ -d ../../$NVM_TEST_VERSION ] || die "./$NVM_TEST_VERSION did not exist" [ -d ../../$NVM_TEST_VERSION ] || die "./$NVM_TEST_VERSION did not exist"
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION \ nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION \
|| "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed" || "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"

View File

@ -18,5 +18,3 @@ nvm install -s || "'nvm install -s' failed"
[ -d ../../$NVM_TEST_VERSION ] || die "$NVM_TEST_VERSION did not exist" [ -d ../../$NVM_TEST_VERSION ] || die "$NVM_TEST_VERSION did not exist"
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION \ nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION \
|| die "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed" || die "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"

View File

@ -3,4 +3,3 @@
if [ -f ".nvmrc" ]; then if [ -f ".nvmrc" ]; then
mv .nvmrc .nvmrc.bak mv .nvmrc .nvmrc.bak
fi fi

View File

@ -12,4 +12,3 @@ fi
if [ -f ".nvmrc.bak" ]; then if [ -f ".nvmrc.bak" ]; then
mv .nvmrc.bak .nvmrc mv .nvmrc.bak .nvmrc
fi fi

View File

@ -9,4 +9,3 @@ die () { echo "$@" ; exit 1; }
nvm install 0.6.21 || die 'v0.6.21 installation failed' nvm install 0.6.21 || die 'v0.6.21 installation failed'
[ "_$(node -v)" = "_v0.6.21-pre" ] || die "v0.6.21-pre not installed with v0.6.21, got $(node -v)" [ "_$(node -v)" = "_v0.6.21-pre" ] || die "v0.6.21-pre not installed with v0.6.21, got $(node -v)"
[ "_$(nvm current)" = "_v0.6.21" ] || die "v0.6.21-pre not reported as v0.6.21, got $(nvm current)" [ "_$(nvm current)" = "_v0.6.21" ] || die "v0.6.21-pre not reported as v0.6.21, got $(nvm current)"

View File

@ -28,4 +28,3 @@ ${NPM_VERSION_ONE}"
OUTPUT="$(nvm exec --silent 1 npm --version | head -1)" OUTPUT="$(nvm exec --silent 1 npm --version | head -1)"
EXPECTED_OUTPUT="${NPM_VERSION_ONE}" EXPECTED_OUTPUT="${NPM_VERSION_ONE}"
[ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "\`nvm exec --silent\` failed to suppress io.js preamble; expected '$EXPECTED_OUTPUT', got '$OUTPUT'" [ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "\`nvm exec --silent\` failed to suppress io.js preamble; expected '$EXPECTED_OUTPUT', got '$OUTPUT'"

View File

@ -14,4 +14,3 @@ echo "0.10.7" > .nvmrc
[ "$(nvm exec npm --version | tail -1)" = "$NPM_VERSION_TEN" ] || die "\`nvm exec\` failed to run with the .nvmrc version" [ "$(nvm exec npm --version | tail -1)" = "$NPM_VERSION_TEN" ] || die "\`nvm exec\` failed to run with the .nvmrc version"
[ "$(nvm exec npm --version | head -1)" = "Found '$PWD/.nvmrc' with version <0.10.7>" ] || die "\`nvm exec\` failed to print out the \"found in .nvmrc\" message" [ "$(nvm exec npm --version | head -1)" = "Found '$PWD/.nvmrc' with version <0.10.7>" ] || die "\`nvm exec\` failed to print out the \"found in .nvmrc\" message"

View File

@ -8,4 +8,3 @@ nvm install --lts
if [ -f ".nvmrc" ]; then if [ -f ".nvmrc" ]; then
mv .nvmrc .nvmrc.bak mv .nvmrc .nvmrc.bak
fi fi

View File

@ -11,4 +11,3 @@ rm .nvmrc
if [ -f ".nvmrc.bak" ]; then if [ -f ".nvmrc.bak" ]; then
mv .nvmrc.bak .nvmrc mv .nvmrc.bak .nvmrc
fi fi

View File

@ -15,4 +15,3 @@ ACTUAL_MSG="$(nvm reinstall-packages 0.10.28 2>&1 > /dev/null)"
EXPECTED_ERROR_CODE="2" EXPECTED_ERROR_CODE="2"
ACTUAL_ERROR_CODE="$(nvm reinstall-packages 0.10.28 > /dev/null 2>&1 ; echo $?)" ACTUAL_ERROR_CODE="$(nvm reinstall-packages 0.10.28 > /dev/null 2>&1 ; echo $?)"
[ "~$ACTUAL_ERROR_CODE" = "~$EXPECTED_ERROR_CODE" ] || die "'nvm use 0.10.28 && nvm reinstall-packages 0.10.28' did not fail with the right error code: expected '$EXPECTED_ERROR_CODE', got '$ACTUAL_ERROR_CODE'" [ "~$ACTUAL_ERROR_CODE" = "~$EXPECTED_ERROR_CODE" ] || die "'nvm use 0.10.28 && nvm reinstall-packages 0.10.28' did not fail with the right error code: expected '$EXPECTED_ERROR_CODE', got '$ACTUAL_ERROR_CODE'"

View File

@ -7,4 +7,3 @@ nvm install 0.10.29
if [ -f ".nvmrc" ]; then if [ -f ".nvmrc" ]; then
mv .nvmrc .nvmrc.bak mv .nvmrc .nvmrc.bak
fi fi

View File

@ -9,4 +9,3 @@ rm -f .nvmrc
if [ -f ".nvmrc.bak" ]; then if [ -f ".nvmrc.bak" ]; then
mv .nvmrc.bak .nvmrc mv .nvmrc.bak .nvmrc
fi fi

View File

@ -6,4 +6,3 @@ die () { echo "$@" ; exit 1; }
nvm run 0.10.7 --harmony --version nvm run 0.10.7 --harmony --version
[ "_$(nvm run 0.10.7 --harmony --version 2>/dev/null | tail -1)" = "_v0.10.7" ] || die "\`nvm run --harmony --version\` failed to run with the correct version" [ "_$(nvm run 0.10.7 --harmony --version 2>/dev/null | tail -1)" = "_v0.10.7" ] || die "\`nvm run --harmony --version\` failed to run with the correct version"

View File

@ -6,4 +6,3 @@ die () { echo "$@" ; exit 1; }
\. ../../../nvm.sh \. ../../../nvm.sh
[ "$(nvm run 0.10.7 --version | tail -1)" = "v0.10.7" ] || die "\`nvm run\` failed to run with the correct version" [ "$(nvm run 0.10.7 --version | tail -1)" = "v0.10.7" ] || die "\`nvm run\` failed to run with the correct version"

View File

@ -10,4 +10,3 @@ echo "0.10.7" > .nvmrc
[ "$(nvm run --version | tail -1)" = "v0.10.7" ] || die "\`nvm run\` failed to run with the .nvmrc version" [ "$(nvm run --version | tail -1)" = "v0.10.7" ] || die "\`nvm run\` failed to run with the .nvmrc version"
[ "$(nvm run --version | head -1)" = "Found '$PWD/.nvmrc' with version <0.10.7>" ] || die "\`nvm run\` failed to print out the \"found in .nvmrc\" message" [ "$(nvm run --version | head -1)" = "Found '$PWD/.nvmrc' with version <0.10.7>" ] || die "\`nvm run\` failed to print out the \"found in .nvmrc\" message"

View File

@ -9,4 +9,3 @@ nvm install --lts
if [ -f ".nvmrc" ]; then if [ -f ".nvmrc" ]; then
mv .nvmrc .nvmrc.bak mv .nvmrc .nvmrc.bak
fi fi

View File

@ -12,4 +12,3 @@ rm .nvmrc
if [ -f ".nvmrc.bak" ]; then if [ -f ".nvmrc.bak" ]; then
mv .nvmrc.bak .nvmrc mv .nvmrc.bak .nvmrc
fi fi

View File

@ -119,4 +119,3 @@ EXIT_CODE="$(nvm_get_latest >/dev/null 2>&1 ; echo $?)"
cleanup cleanup

View File

@ -23,4 +23,3 @@ EXIT_CODE="$(nvm_get_latest >/dev/null 2>&1 ; echo $?)"
|| die "failed redirect did not exit with code 2, got $EXIT_CODE" || die "failed redirect did not exit with code 2, got $EXIT_CODE"
cleanup cleanup

View File

@ -15,4 +15,3 @@ NVM_LS_CURRENT="$(nvm ls current | strip_colors | \grep -o v0.10.1)"
NVM_ALIAS_DEFAULT="$(nvm alias default | strip_colors)" NVM_ALIAS_DEFAULT="$(nvm alias default | strip_colors)"
[ "_$NVM_ALIAS_DEFAULT" = "_default -> 0.10.1 (-> v0.10.1)" ] \ [ "_$NVM_ALIAS_DEFAULT" = "_default -> 0.10.1 (-> v0.10.1)" ] \
|| die "'nvm alias default did not return 'default -> 0.10.1 (-> v0.10.1)', got '$NVM_ALIAS_DEFAULT'" || die "'nvm alias default did not return 'default -> 0.10.1 (-> v0.10.1)', got '$NVM_ALIAS_DEFAULT'"

View File

@ -25,4 +25,3 @@ nvm_version 0.10.2 >/dev/null 2>&1 || die "v0.10.2 not installed: $(nvm ls)"
NVM_LS_CURRENT="$(nvm ls current | \grep -o v0.10.2)" NVM_LS_CURRENT="$(nvm ls current | \grep -o v0.10.2)"
[ "_$NVM_LS_CURRENT" = '_v0.10.2' ] || die "'nvm ls current' did not return '-> v0.10.2', got '$NVM_LS_CURRENT' `nvm ls`" [ "_$NVM_LS_CURRENT" = '_v0.10.2' ] || die "'nvm ls current' did not return '-> v0.10.2', got '$NVM_LS_CURRENT' `nvm ls`"

View File

@ -30,4 +30,3 @@ NVM_LS_CURRENT="$(nvm ls current | strip_colors | command grep -o v0.10.2)"
NVM_ALIAS_DEFAULT="$(nvm alias default | strip_colors)" NVM_ALIAS_DEFAULT="$(nvm alias default | strip_colors)"
[ "_$NVM_ALIAS_DEFAULT" = "_default -> 0.10.2 (-> v0.10.2)" ] \ [ "_$NVM_ALIAS_DEFAULT" = "_default -> 0.10.2 (-> v0.10.2)" ] \
|| die "'nvm alias default did not return 'default -> 0.10.2 (-> v0.10.2)', got '$NVM_ALIAS_DEFAULT'" || die "'nvm alias default did not return 'default -> 0.10.2 (-> v0.10.2)', got '$NVM_ALIAS_DEFAULT'"

View File

@ -29,4 +29,3 @@ echo 'sourcing complete.'
NVM_CURRENT="$(nvm current)" 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_CURRENT" = '_none' ] || [ "_$NVM_CURRENT" = '_system' ] || die "'nvm current' did not return 'none' or 'system', got '$NVM_CURRENT' `nvm ls`"

View File

@ -11,4 +11,3 @@ rm -rf ../../v0.9.12
nvm install 0.10.1 || echo >&2 'nvm install 0.10.1 failed' nvm install 0.10.1 || echo >&2 'nvm install 0.10.1 failed'
nvm unalias default || 'removing default alias failed' nvm unalias default || 'removing default alias failed'
nvm unload || echo >&2 'nvm unload failed' nvm unload || echo >&2 'nvm unload failed'

View File

@ -4,4 +4,3 @@ rm -rf ../../alias
rm -rf ../../v0.10.1 rm -rf ../../v0.10.1
rm -rf ../../v0.10.2 rm -rf ../../v0.10.2
rm -f ../../.nvmrc rm -f ../../.nvmrc