Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 7ce76251 authored by Martin Fischer's avatar Martin Fischer Committed by GitHub
Browse files

Merge pull request #804 from return42/minor-fix

[mod] lib_nvm.sh: minor improvements / no functional change
parents b2018a88 a1633854
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -26,11 +26,12 @@ NVM_LOCAL_FOLDER=.nvm
nvm.env() {
    source "${NVM_DIR}/nvm.sh"
    source "${NVM_DIR}/bash_completion"
    [ "$VERBOSE" = "1" ] && info_msg "sourced NVM environment from ${NVM_DIR}"
}

nvm.is_installed() {
    # 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
@@ -40,7 +41,6 @@ fi
export NVM_DIR

if nvm.is_installed; then
    [ "$VERBOSE" = "1" ] && info_msg "source NVM environment from ${NVM_DIR}"
    nvm.env
else
    # if nvm is not installed, use this function as a wrapper