Skip to content
Myr

Merge pull request #622 from ohcibi/master

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

Prefer tee over > to maximize compatibility

authored by Jordan Harband · committed by Jordan Harband · parents 1559889, cba5094 · Browse files · 2 files+22 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+22 added−1 removed

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

2 files+22 added−1 removed

added:test/fast/Aliases/Running "nvm alias <aliasname> <target>" again should change the target+21 added
1#!/bin/sh23. ../../../nvm.sh45die () { echo $@ ; exit 1; }67if [ -n "$ZSH_VERSION" ]; then8 # set clobber option in order to test that this does not produce any9 # incompatibilities10 setopt noclobber11fi1213nvm alias test-stable-1 0.0.21415nvm alias test-stable-1 | \grep -e "test-stable-1 -> 0.0.2 (-> v0.0.2)" \16 || die "nvm alias test-stable-1 0.0.2 did not set test-stable-1 to 0.0.2"1718nvm alias test-stable-1 0.0.11920nvm alias test-stable-1 | \grep -e "test-stable-1 -> 0.0.1 (-> v0.0.1)" \21 || die "nvm alias test-stable-1 0.0.1 did not set test-stable-1 to 0.0.1"
modified:nvm.sh+1 added-1 removed
1446 unmodified lines
1447 VERSION="$(nvm_version "$3")"1448 if [ $? -ne 0 ]; then1449 echo "! WARNING: Version '$3' does not exist." >&21450 fi1451 echo "$3" > "$NVM_ALIAS_DIR/$2"1451 echo "$3" | tee "$NVM_ALIAS_DIR/$2"1452 if [ ! "_$3" = "_$VERSION" ]; then1453 echo "$2 -> $3 (-> $VERSION)"1454 else1455 echo "$2 -> $3"
85 unmodified lines