From a879ff1515b6bd80eea695c03e22289bd6743718 Mon Sep 17 00:00:00 2001 From: Carlo Sala Date: Fri, 22 Apr 2022 19:37:57 +0200 Subject: [PATCH] fix(nvm): support path from Apple Silicon Homebrew (#10875) --- plugins/nvm/nvm.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/nvm/nvm.plugin.zsh b/plugins/nvm/nvm.plugin.zsh index 3ef8cc1d8..b8f28c27c 100644 --- a/plugins/nvm/nvm.plugin.zsh +++ b/plugins/nvm/nvm.plugin.zsh @@ -16,7 +16,7 @@ if [[ -f "$NVM_DIR/nvm.sh" ]]; then else # Otherwise try to load nvm installed via Homebrew # User can set this if they have an unusual Homebrew setup - NVM_HOMEBREW="${NVM_HOMEBREW:-/usr/local/opt/nvm}" + NVM_HOMEBREW="${NVM_HOMEBREW:-${HOMEBREW_PREFIX:-$(brew --prefix)}/opt/nvm}" # Load nvm from Homebrew location if it exists if [[ -f "$NVM_HOMEBREW/nvm.sh" ]]; then source "$NVM_HOMEBREW/nvm.sh" ${NVM_LAZY+"--no-use"}