Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d78722b284 | ||
|
|
4c475b2767 | ||
|
|
a539cba11e | ||
|
|
472ba5fc46 |
@@ -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:
|
To install you could use the [install script][2] using cURL:
|
||||||
|
|
||||||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.2/install.sh | bash
|
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash
|
||||||
|
|
||||||
or Wget:
|
or Wget:
|
||||||
|
|
||||||
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.25.2/install.sh | bash
|
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/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>
|
<sub>The script clones the nvm repository to `~/.nvm` and adds the source line to your profile (`~/.bash_profile`, `~/.zshrc` or `~/.profile`).</sub>
|
||||||
|
|
||||||
@@ -220,7 +220,7 @@ After the v0.8.6 release of node, nvm tries to install from binary packages. But
|
|||||||
nvm install -s 0.8.6
|
nvm install -s 0.8.6
|
||||||
|
|
||||||
[1]: https://github.com/creationix/nvm.git
|
[1]: https://github.com/creationix/nvm.git
|
||||||
[2]: https://github.com/creationix/nvm/blob/v0.25.2/install.sh
|
[2]: https://github.com/creationix/nvm/blob/v0.25.4/install.sh
|
||||||
[3]: https://travis-ci.org/creationix/nvm
|
[3]: https://travis-ci.org/creationix/nvm
|
||||||
[Urchin]: https://github.com/scraperwiki/urchin
|
[Urchin]: https://github.com/scraperwiki/urchin
|
||||||
[Fish]: http://fishshell.com
|
[Fish]: http://fishshell.com
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ __nvm_aliases ()
|
|||||||
declare aliases
|
declare aliases
|
||||||
aliases=""
|
aliases=""
|
||||||
if [ -d $NVM_DIR/alias ]; then
|
if [ -d $NVM_DIR/alias ]; then
|
||||||
aliases="`cd $NVM_DIR/alias && ls`"
|
aliases="`cd $NVM_DIR/alias && command ls`"
|
||||||
fi
|
fi
|
||||||
echo "${aliases}"
|
echo "${aliases}"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ if [ -z "$NVM_DIR" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
nvm_latest_version() {
|
nvm_latest_version() {
|
||||||
echo "v0.25.2"
|
echo "v0.25.4"
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
4
nvm.sh
4
nvm.sh
@@ -1760,7 +1760,7 @@ $NVM_LS_REMOTE_IOJS_OUTPUT" | command grep -v "N/A" | sed '/^$/d')"
|
|||||||
nvm_version $2
|
nvm_version $2
|
||||||
;;
|
;;
|
||||||
"--version" )
|
"--version" )
|
||||||
echo "0.25.2"
|
echo "0.25.4"
|
||||||
;;
|
;;
|
||||||
"unload" )
|
"unload" )
|
||||||
unset -f nvm nvm_print_versions nvm_checksum \
|
unset -f nvm nvm_print_versions nvm_checksum \
|
||||||
@@ -1784,7 +1784,7 @@ nvm_supports_source_options() {
|
|||||||
[ "_$(echo 'echo $1' | . /dev/stdin yes 2> /dev/null)" = "_yes" ]
|
[ "_$(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 nvm_supports_source_options && [ "_$1" = "_--install" ]; then
|
||||||
if [ -n "$VERSION" ]; then
|
if [ -n "$VERSION" ]; then
|
||||||
nvm install "$VERSION" >/dev/null
|
nvm install "$VERSION" >/dev/null
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nvm",
|
"name": "nvm",
|
||||||
"version": "0.25.2",
|
"version": "0.25.4",
|
||||||
"description": "Node Version Manager - Simple bash script to manage multiple active node.js versions",
|
"description": "Node Version Manager - Simple bash script to manage multiple active node.js versions",
|
||||||
"directories": {
|
"directories": {
|
||||||
"test": "test"
|
"test": "test"
|
||||||
|
|||||||
11
test/sourcing/Sourcing nvm.sh with no default should return 0
Executable file
11
test/sourcing/Sourcing nvm.sh with no default should return 0
Executable 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'
|
||||||
Reference in New Issue
Block a user