Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1eaf6b53e4 | ||
|
|
24c60e4e51 |
@@ -12,11 +12,11 @@ Note: `nvm` does not support Windows (see [#284](https://github.com/creationix/n
|
|||||||
|
|
||||||
To install you could use the [install script][2] using cURL:
|
To install you could use the [install script][2] using cURL:
|
||||||
|
|
||||||
curl https://raw.githubusercontent.com/creationix/nvm/v0.23.1/install.sh | bash
|
curl https://raw.githubusercontent.com/creationix/nvm/v0.23.2/install.sh | bash
|
||||||
|
|
||||||
or Wget:
|
or Wget:
|
||||||
|
|
||||||
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.23.1/install.sh | bash
|
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.23.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>
|
<sub>The script clones the nvm repository to `~/.nvm` and adds the source line to your profile (`~/.bash_profile`, `~/.zshrc` or `~/.profile`).</sub>
|
||||||
|
|
||||||
@@ -202,7 +202,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.23.1/install.sh
|
[2]: https://github.com/creationix/nvm/blob/v0.23.2/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
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ if [ -z "$NVM_DIR" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
nvm_latest_version() {
|
nvm_latest_version() {
|
||||||
echo "v0.23.1"
|
echo "v0.23.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
4
nvm.sh
4
nvm.sh
@@ -218,7 +218,7 @@ nvm_remote_version() {
|
|||||||
PATTERN="$1"
|
PATTERN="$1"
|
||||||
local VERSION
|
local VERSION
|
||||||
if nvm_validate_implicit_alias "$PATTERN" 2> /dev/null ; then
|
if nvm_validate_implicit_alias "$PATTERN" 2> /dev/null ; then
|
||||||
VERSIONS="$(nvm_ls_remote "$PATTERN")"
|
VERSION="$(nvm_ls_remote "$PATTERN")"
|
||||||
else
|
else
|
||||||
case "_$PATTERN" in
|
case "_$PATTERN" in
|
||||||
"_$(nvm_node_prefix)")
|
"_$(nvm_node_prefix)")
|
||||||
@@ -1502,7 +1502,7 @@ $NVM_LS_REMOTE_IOJS_OUTPUT" | command grep -v "N/A" | sed '/^$/d')"
|
|||||||
nvm_version $2
|
nvm_version $2
|
||||||
;;
|
;;
|
||||||
"--version" )
|
"--version" )
|
||||||
echo "0.23.1"
|
echo "0.23.2"
|
||||||
;;
|
;;
|
||||||
"unload" )
|
"unload" )
|
||||||
unset -f nvm nvm_print_versions nvm_checksum \
|
unset -f nvm nvm_print_versions nvm_checksum \
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nvm",
|
"name": "nvm",
|
||||||
"version": "0.23.1",
|
"version": "0.23.2",
|
||||||
"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"
|
||||||
|
|||||||
@@ -26,9 +26,18 @@ EXIT_CODE="$(nvm_remote_version iojs-foo >/dev/null 2>&1 ; echo $?)"
|
|||||||
|
|
||||||
|
|
||||||
nvm_ls_remote() {
|
nvm_ls_remote() {
|
||||||
echo "test output"
|
if ! nvm_is_iojs_version "$1"; then
|
||||||
echo "more test output"
|
echo "test output"
|
||||||
echo "pattern received: _$1_"
|
echo "more test output"
|
||||||
|
echo "pattern received: _$1_"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
nvm_ls_remote_iojs() {
|
||||||
|
if nvm_is_iojs_version "$1"; then
|
||||||
|
echo "test iojs output"
|
||||||
|
echo "more iojs test output"
|
||||||
|
echo "iojs pattern received: _$1_"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
OUTPUT="$(nvm_remote_version foo)"
|
OUTPUT="$(nvm_remote_version foo)"
|
||||||
EXIT_CODE="$(nvm_remote_version foo >/dev/null 2>&1 ; echo $?)"
|
EXIT_CODE="$(nvm_remote_version foo >/dev/null 2>&1 ; echo $?)"
|
||||||
@@ -36,17 +45,17 @@ EXIT_CODE="$(nvm_remote_version foo >/dev/null 2>&1 ; echo $?)"
|
|||||||
|| die "nvm_remote_version foo did not return last line only of nvm_ls_remote foo; got $OUTPUT"
|
|| die "nvm_remote_version foo did not return last line only of nvm_ls_remote foo; got $OUTPUT"
|
||||||
[ "_$EXIT_CODE" = "_0" ] || die "nvm_remote_version foo did not exit with 0, got $EXIT_CODE"
|
[ "_$EXIT_CODE" = "_0" ] || die "nvm_remote_version foo did not exit with 0, got $EXIT_CODE"
|
||||||
|
|
||||||
nvm_ls_remote_iojs() {
|
|
||||||
echo "test iojs output"
|
|
||||||
echo "more iojs test output"
|
|
||||||
echo "iojs pattern received: _$1_"
|
|
||||||
|
|
||||||
}
|
|
||||||
OUTPUT="$(nvm_remote_version iojs-foo)"
|
OUTPUT="$(nvm_remote_version iojs-foo)"
|
||||||
EXIT_CODE="$(nvm_remote_version iojs-foo >/dev/null 2>&1 ; echo $?)"
|
EXIT_CODE="$(nvm_remote_version iojs-foo >/dev/null 2>&1 ; echo $?)"
|
||||||
[ "_$OUTPUT" = "_iojs pattern received: _iojs-foo_" ] \
|
[ "_$OUTPUT" = "_iojs pattern received: _iojs-foo_" ] \
|
||||||
|| die "nvm_remote_version iojs-foo did not return last line only of nvm_ls_remote_iojs foo; got $OUTPUT"
|
|| die "nvm_remote_version iojs-foo did not return last line only of nvm_ls_remote_iojs foo; got $OUTPUT"
|
||||||
[ "_$EXIT_CODE" = "_0" ] || die "nvm_remote_version iojs-foo did not exit with 0, got $EXIT_CODE"
|
[ "_$EXIT_CODE" = "_0" ] || die "nvm_remote_version iojs-foo did not exit with 0, got $EXIT_CODE"
|
||||||
|
|
||||||
|
OUTPUT="$(nvm_remote_version stable)"
|
||||||
|
EXIT_CODE="$(nvm_remote_version stable >/dev/null 2>&1 ; echo $?)"
|
||||||
|
[ "_$OUTPUT" = "_$(nvm_ls_remote stable)" ] \
|
||||||
|
|| die "nvm_remote_version stable did not return contents of nvm_ls_remote stable; got $OUTPUT"
|
||||||
|
[ "_$EXIT_CODE" = "_0" ] || die "nvm_remote_version stable did not exit with 0, got $EXIT_CODE"
|
||||||
|
|
||||||
cleanup
|
cleanup
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user