[New] `use`: set `NVM_INC` to expose the node include path
parent
f4eddb2c9c
commit
6c560b12b6
4
nvm.sh
4
nvm.sh
|
@ -2896,6 +2896,7 @@ nvm() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
unset NVM_BIN
|
unset NVM_BIN
|
||||||
|
unset NVM_INC
|
||||||
;;
|
;;
|
||||||
"use")
|
"use")
|
||||||
local PROVIDED_VERSION
|
local PROVIDED_VERSION
|
||||||
|
@ -2993,6 +2994,7 @@ nvm() {
|
||||||
export PATH
|
export PATH
|
||||||
hash -r
|
hash -r
|
||||||
export NVM_BIN="${NVM_VERSION_DIR}/bin"
|
export NVM_BIN="${NVM_VERSION_DIR}/bin"
|
||||||
|
export NVM_INC="${NVM_VERSION_DIR}/include/node"
|
||||||
if [ "${NVM_SYMLINK_CURRENT-}" = true ]; then
|
if [ "${NVM_SYMLINK_CURRENT-}" = true ]; then
|
||||||
command rm -f "${NVM_DIR}/current" && ln -s "${NVM_VERSION_DIR}" "${NVM_DIR}/current"
|
command rm -f "${NVM_DIR}/current" && ln -s "${NVM_VERSION_DIR}" "${NVM_DIR}/current"
|
||||||
fi
|
fi
|
||||||
|
@ -3542,7 +3544,7 @@ nvm() {
|
||||||
nvm_curl_libz_support nvm_command_info nvm_is_zsh nvm_stdout_is_terminal \
|
nvm_curl_libz_support nvm_command_info nvm_is_zsh nvm_stdout_is_terminal \
|
||||||
>/dev/null 2>&1
|
>/dev/null 2>&1
|
||||||
unset NVM_RC_VERSION NVM_NODEJS_ORG_MIRROR NVM_IOJS_ORG_MIRROR NVM_DIR \
|
unset NVM_RC_VERSION NVM_NODEJS_ORG_MIRROR NVM_IOJS_ORG_MIRROR NVM_DIR \
|
||||||
NVM_CD_FLAGS NVM_BIN NVM_MAKE_JOBS \
|
NVM_CD_FLAGS NVM_BIN NVM_INC NVM_MAKE_JOBS \
|
||||||
>/dev/null 2>&1
|
>/dev/null 2>&1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
Loading…
Reference in New Issue