mirror of
https://github.com/lukechilds/zsh-nvm.git
synced 2025-02-27 10:25:31 +08:00
Wrap nvm install to add support for rc/nightly
This commit is contained in:
parent
7577d37b7e
commit
3d6c5606b2
@ -61,6 +61,9 @@ _zsh_nvm_load() {
|
||||
_zsh_nvm_nvm "$@"
|
||||
export NVM_AUTO_USE_ACTIVE=false
|
||||
;;
|
||||
'install')
|
||||
_zsh_nvm_install_wrapper "$@"
|
||||
;;
|
||||
*)
|
||||
_zsh_nvm_nvm "$@"
|
||||
;;
|
||||
@ -172,6 +175,20 @@ _zsh_nvm_auto_use() {
|
||||
fi
|
||||
}
|
||||
|
||||
_zsh_nvm_install_wrapper() {
|
||||
case $2 in
|
||||
'rc')
|
||||
NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/rc/ nvm install node
|
||||
;;
|
||||
'nightly')
|
||||
NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly/ nvm install node
|
||||
;;
|
||||
*)
|
||||
_zsh_nvm_nvm "$@"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Don't init anything if this is true (debug/testing only)
|
||||
if [[ "$ZSH_NVM_NO_LOAD" != true ]]; then
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user