mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-08-20 04:23:43 +00:00
Compare commits
3 Commits
959bc41bdb
...
db1d01aa5d
Author | SHA1 | Date | |
---|---|---|---|
![]() |
db1d01aa5d | ||
![]() |
6b70c40f15 | ||
![]() |
cbaffd8eca |
@ -349,7 +349,7 @@ In place of a version pointer like "14.7" or "16.3" or "12.22.1", you can use th
|
||||
|
||||
### Long-term Support
|
||||
|
||||
Node has a [schedule](https://github.com/nodejs/Release#release-schedule) for long-term support (LTS) You can reference LTS versions in aliases and `.nvmrc` files with the notation `lts/*` for the latest LTS, and `lts/argon` for LTS releases from the "argon" line, for example. In addition, the following commands support LTS arguments:
|
||||
Node has a [schedule](https://github.com/nodejs/Release#release-schedule) for long-term support (LTS) You can reference LTS versions in aliases and `.nvmrc` files with the notation `lts/*` for the latest _Active_ LTS, and `lts/argon` for LTS releases from the "argon" line, for example. In addition, the following commands support LTS arguments:
|
||||
|
||||
- `nvm install --lts` / `nvm install --lts=argon` / `nvm install 'lts/*'` / `nvm install lts/argon`
|
||||
- `nvm uninstall --lts` / `nvm uninstall --lts=argon` / `nvm uninstall 'lts/*'` / `nvm uninstall lts/argon`
|
||||
|
5
nvm.sh
5
nvm.sh
@ -196,6 +196,9 @@ nvm_install_latest_npm() {
|
||||
nvm_echo 'Attempting to upgrade to the latest working version of npm...'
|
||||
local NODE_VERSION
|
||||
NODE_VERSION="$(nvm_strip_iojs_prefix "$(nvm_ls_current)")"
|
||||
local NPM_VERSION
|
||||
NPM_VERSION="$(npm --version 2>/dev/null)"
|
||||
|
||||
if [ "${NODE_VERSION}" = 'system' ]; then
|
||||
NODE_VERSION="$(node --version)"
|
||||
elif [ "${NODE_VERSION}" = 'none' ]; then
|
||||
@ -206,8 +209,6 @@ nvm_install_latest_npm() {
|
||||
nvm_err 'Unable to obtain node version.'
|
||||
return 1
|
||||
fi
|
||||
local NPM_VERSION
|
||||
NPM_VERSION="$(npm --version 2>/dev/null)"
|
||||
if [ -z "${NPM_VERSION}" ]; then
|
||||
nvm_err 'Unable to obtain npm version.'
|
||||
return 2
|
||||
|
Loading…
x
Reference in New Issue
Block a user