2014-05-05 03:03:26 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-07-07 15:00:59 +08:00
|
|
|
set -ex
|
|
|
|
|
2014-05-05 03:03:26 +08:00
|
|
|
die () { echo $@ ; exit 1; }
|
|
|
|
|
|
|
|
. ../../nvm.sh
|
|
|
|
|
2016-07-07 15:00:59 +08:00
|
|
|
set +ex # needed for stderr
|
|
|
|
OUTPUT="$(nvm install invalid.invalid 2>&1)"
|
|
|
|
set -ex
|
|
|
|
EXPECTED_OUTPUT="Version 'invalid.invalid' not found - try \`nvm ls-remote\` to browse available versions."
|
|
|
|
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "nvm installing an invalid version did not print a nice error message"
|