mirror of https://github.com/searxng/searxng.git
[mod] lib_nvm.sh: minor improvements / no functional change
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
382f4f8fb0
commit
a163385474
|
@ -26,11 +26,12 @@ NVM_LOCAL_FOLDER=.nvm
|
||||||
nvm.env() {
|
nvm.env() {
|
||||||
source "${NVM_DIR}/nvm.sh"
|
source "${NVM_DIR}/nvm.sh"
|
||||||
source "${NVM_DIR}/bash_completion"
|
source "${NVM_DIR}/bash_completion"
|
||||||
|
[ "$VERBOSE" = "1" ] && info_msg "sourced NVM environment from ${NVM_DIR}"
|
||||||
}
|
}
|
||||||
|
|
||||||
nvm.is_installed() {
|
nvm.is_installed() {
|
||||||
# is true if NVM is installed / in $HOME or even in <repo-root>/.nvm
|
# is true if NVM is installed / in $HOME or even in <repo-root>/.nvm
|
||||||
[[ -d "${NVM_DIR}" ]]
|
[[ -f "${NVM_DIR}/nvm.sh" ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ -z "${NVM_DIR}" ]]; then
|
if [[ -z "${NVM_DIR}" ]]; then
|
||||||
|
@ -40,7 +41,6 @@ fi
|
||||||
export NVM_DIR
|
export NVM_DIR
|
||||||
|
|
||||||
if nvm.is_installed; then
|
if nvm.is_installed; then
|
||||||
[ "$VERBOSE" = "1" ] && info_msg "source NVM environment from ${NVM_DIR}"
|
|
||||||
nvm.env
|
nvm.env
|
||||||
else
|
else
|
||||||
# if nvm is not installed, use this function as a wrapper
|
# if nvm is not installed, use this function as a wrapper
|
||||||
|
|
Loading…
Reference in New Issue