mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-08-19 20:13:44 +00:00
Compare commits
3 Commits
7ed520d3e9
...
a7e2adb473
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a7e2adb473 | ||
![]() |
6b70c40f15 | ||
![]() |
1f13a1f04f |
@ -207,7 +207,7 @@ If you're running a system without prepackaged binary available, which means you
|
|||||||
- [bass](https://github.com/edc/bass) allows you to use utilities written for Bash in fish shell
|
- [bass](https://github.com/edc/bass) allows you to use utilities written for Bash in fish shell
|
||||||
- [fast-nvm-fish](https://github.com/brigand/fast-nvm-fish) only works with version numbers (not aliases) but doesn't significantly slow your shell startup
|
- [fast-nvm-fish](https://github.com/brigand/fast-nvm-fish) only works with version numbers (not aliases) but doesn't significantly slow your shell startup
|
||||||
- [plugin-nvm](https://github.com/derekstavis/plugin-nvm) plugin for [Oh My Fish](https://github.com/oh-my-fish/oh-my-fish), which makes nvm and its completions available in fish shell
|
- [plugin-nvm](https://github.com/derekstavis/plugin-nvm) plugin for [Oh My Fish](https://github.com/oh-my-fish/oh-my-fish), which makes nvm and its completions available in fish shell
|
||||||
- [fnm](https://github.com/fisherman/fnm) - [fisherman](https://github.com/fisherman/fisherman)-based version manager for fish
|
- [nvm.fish](https://github.com/jorgebucaran/nvm.fish) - Node.js version manager lovingly made for Fish
|
||||||
- [fish-nvm](https://github.com/FabioAntunes/fish-nvm) - Wrapper around nvm for fish, delays sourcing nvm until it's actually used.
|
- [fish-nvm](https://github.com/FabioAntunes/fish-nvm) - Wrapper around nvm for fish, delays sourcing nvm until it's actually used.
|
||||||
|
|
||||||
**Note:** We still have some problems with FreeBSD, because there is no official pre-built binary for FreeBSD, and building from source may need [patches](https://www.freshports.org/www/node/files/patch-deps_v8_src_base_platform_platform-posix.cc); see the issue ticket:
|
**Note:** We still have some problems with FreeBSD, because there is no official pre-built binary for FreeBSD, and building from source may need [patches](https://www.freshports.org/www/node/files/patch-deps_v8_src_base_platform_platform-posix.cc); see the issue ticket:
|
||||||
|
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...'
|
nvm_echo 'Attempting to upgrade to the latest working version of npm...'
|
||||||
local NODE_VERSION
|
local NODE_VERSION
|
||||||
NODE_VERSION="$(nvm_strip_iojs_prefix "$(nvm_ls_current)")"
|
NODE_VERSION="$(nvm_strip_iojs_prefix "$(nvm_ls_current)")"
|
||||||
|
local NPM_VERSION
|
||||||
|
NPM_VERSION="$(npm --version 2>/dev/null)"
|
||||||
|
|
||||||
if [ "${NODE_VERSION}" = 'system' ]; then
|
if [ "${NODE_VERSION}" = 'system' ]; then
|
||||||
NODE_VERSION="$(node --version)"
|
NODE_VERSION="$(node --version)"
|
||||||
elif [ "${NODE_VERSION}" = 'none' ]; then
|
elif [ "${NODE_VERSION}" = 'none' ]; then
|
||||||
@ -206,8 +209,6 @@ nvm_install_latest_npm() {
|
|||||||
nvm_err 'Unable to obtain node version.'
|
nvm_err 'Unable to obtain node version.'
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
local NPM_VERSION
|
|
||||||
NPM_VERSION="$(npm --version 2>/dev/null)"
|
|
||||||
if [ -z "${NPM_VERSION}" ]; then
|
if [ -z "${NPM_VERSION}" ]; then
|
||||||
nvm_err 'Unable to obtain npm version.'
|
nvm_err 'Unable to obtain npm version.'
|
||||||
return 2
|
return 2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user