Compare commits

...

2 Commits

Author SHA1 Message Date
Jordan Harband
00f3ba0831 v0.24.2 2015-05-22 15:20:49 -07:00
Jordan Harband
0f1efc825e Make sure sourcing nvm.sh on shells that don't support source options doesn't exit nonzero.
Fixes #721
2015-05-22 15:20:33 -07:00
5 changed files with 18 additions and 7 deletions

View File

@@ -16,11 +16,11 @@ Note: `nvm` does not support [Fish] either (see [#303](https://github.com/creati
To install you could use the [install script][2] using cURL:
curl https://raw.githubusercontent.com/creationix/nvm/v0.24.1/install.sh | bash
curl https://raw.githubusercontent.com/creationix/nvm/v0.24.2/install.sh | bash
or Wget:
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.24.1/install.sh | bash
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.24.2/install.sh | bash
<sub>The script clones the nvm repository to `~/.nvm` and adds the source line to your profile (`~/.bash_profile`, `~/.zshrc` or `~/.profile`).</sub>
@@ -206,7 +206,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.24.1/install.sh
[2]: https://github.com/creationix/nvm/blob/v0.24.2/install.sh
[3]: https://travis-ci.org/creationix/nvm
[Urchin]: https://github.com/scraperwiki/urchin
[Fish]: http://fishshell.com

View File

@@ -11,7 +11,7 @@ if [ -z "$NVM_DIR" ]; then
fi
nvm_latest_version() {
echo "v0.24.1"
echo "v0.24.2"
}
#

4
nvm.sh
View File

@@ -1703,7 +1703,7 @@ $NVM_LS_REMOTE_IOJS_OUTPUT" | command grep -v "N/A" | sed '/^$/d')"
nvm_version $2
;;
"--version" )
echo "0.24.1"
echo "0.24.2"
;;
"unload" )
unset -f nvm nvm_print_versions nvm_checksum \
@@ -1727,7 +1727,7 @@ nvm_supports_source_options() {
[ "_$(echo 'echo $1' | . /dev/stdin yes 2> /dev/null)" = "_yes" ]
}
VERSION="$(nvm_alias default 2>/dev/null)"
VERSION="$(nvm_alias default 2>/dev/null || echo)"
if nvm_supports_source_options && [ "_$1" = "_--install" ]; then
if [ -n "$VERSION" ]; then
nvm install "$VERSION" >/dev/null

View File

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

View File

@@ -0,0 +1,11 @@
#!/bin/sh
die () { echo $@ ; exit 1; }
touch ../../alias/default
rm ../../alias/default || die 'removal of default alias failed'
nvm_alias default && die '"nvm_alias default" did not fail'
set -e # necessary to fail internally with a nonzero code
. ../../nvm.sh || die 'sourcing returned nonzero exit code'