From fcb3aec76487fa75c653c606f38e33616a8878b8 Mon Sep 17 00:00:00 2001 From: menaechmi Date: Wed, 6 Nov 2024 16:53:58 -0600 Subject: [PATCH] [fix] add ZDOTDIR to zsh search fixes #3128 --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 459d3b5c06d..b2deb8694cc 100755 --- a/install.sh +++ b/install.sh @@ -296,10 +296,10 @@ nvm_detect_profile() { DETECTED_PROFILE="$HOME/.bash_profile" fi elif [ "${SHELL#*zsh}" != "$SHELL" ]; then - if [ -f "$HOME/.zshrc" ]; then - DETECTED_PROFILE="$HOME/.zshrc" - elif [ -f "$HOME/.zprofile" ]; then - DETECTED_PROFILE="$HOME/.zprofile" + if [ -f "${ZDOTDIR:-${HOME}}/.zshrc" ]; then + DETECTED_PROFILE="${ZDOTDIR:-${HOME}}/.zshrc" + elif [ -f "${ZDOTDIR:-${HOME}}/.zprofile" ]; then + DETECTED_PROFILE="${ZDOTDIR:-${HOME}}/.zprofile" fi fi