Compare commits

...

2 Commits

Author SHA1 Message Date
Jordan Harband
29f582611b v0.6.1 2014-05-04 12:40:02 -07:00
Jordan Harband
673cda56c4 Adding a test for nvm install invalid behavior, and correcting the message.
From f00d688c87 (commitcomment-6205164)
2014-05-04 12:03:26 -07:00
4 changed files with 13 additions and 6 deletions

View File

@@ -8,11 +8,11 @@ First you'll need to make sure your system has a c++ compiler. For OSX, XCode w
To install you could use the [install script][2] using cURL:
curl https://raw.githubusercontent.com/creationix/nvm/v0.6.0/install.sh | sh
curl https://raw.githubusercontent.com/creationix/nvm/v0.6.1/install.sh | sh
or Wget:
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.6.0/install.sh | sh
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.6.1/install.sh | sh
<sub>The script clones the nvm repository to `~/.nvm` and adds the source line to your profile (`~/.bash_profile`, `~/.zshrc` or `~/.profile`).</sub>
@@ -163,7 +163,7 @@ After the v0.8.6 release of node, nvm tries to install from binary packages. But
nvm install -s 0.8.6
[1]: https://github.com/creationix/nvm.git
[2]: https://github.com/creationix/nvm/blob/v0.6.0/install.sh
[2]: https://github.com/creationix/nvm/blob/v0.6.1/install.sh
[3]: https://travis-ci.org/creationix/nvm
[Urchin]: https://github.com/scraperwiki/urchin

4
nvm.sh
View File

@@ -309,7 +309,7 @@ nvm() {
[ -d "$NVM_DIR/$VERSION" ] && echo "$VERSION is already installed." && return
if [ "$VERSION" = "N/A" ]; then
echo "Version '$VERSION' not found - try \`nvm ls-remote\` to browse available versions."
echo "Version '$provided_version' not found - try \`nvm ls-remote\` to browse available versions."
return 3
fi
@@ -616,7 +616,7 @@ nvm() {
nvm_version $2
;;
"--version" )
echo "nvm v0.6.0"
echo "nvm v0.6.1"
;;
* )
nvm help

View File

@@ -1,6 +1,6 @@
{
"name": "nvm",
"version": "0.6.0",
"version": "0.6.1",
"description": "Node Version Manager - Simple bash script to manage multiple active node.js versions",
"directories": {
"test": "test"

View File

@@ -0,0 +1,7 @@
#!/bin/sh
die () { echo $@ ; exit 1; }
. ../../nvm.sh
[ "$(nvm install invalid.invalid)" = "Version 'invalid.invalid' not found - try \`nvm ls-remote\` to browse available versions." ] || die "nvm installing an invalid version did not print a nice error message"