Prefix to PATH rather than postfix

This commit is contained in:
Max O'Cull 2024-07-03 00:34:06 -04:00
parent 1f03039e85
commit 364258fef4
No known key found for this signature in database
GPG Key ID: F8362D782F70AEAB

View File

@ -83,13 +83,13 @@ _zsh_nvm_load() {
_zsh_nvm_lazy_load() {
if [[ "$NVM_CACHE_LOAD" == true ]] && [[ -s "${HOME}/.zsh_nvm_cache" ]]; then
export NVM_CACHE_LOAD_PATH_NVM="$(cat "${HOME}/.zsh_nvm_cache")"
# Add it to path if it doesn't already exist.
if [ -d "$NVM_CACHE_LOAD_PATH_NVM" ] && [[ ":$PATH:" != *":$NVM_CACHE_LOAD_PATH_NVM:"* ]]; then
export PATH="${PATH:+"$PATH:"}${NVM_CACHE_LOAD_PATH_NVM}"
export PATH="${NVM_CACHE_LOAD_PATH_NVM}${PATH:+":$PATH"}"
fi
fi
# Get all global node module binaries including node
# (only if NVM_NO_USE is off)
local global_binaries