[New] install.sh: add $ZDOTDIR to zsh search

Fixes #3128
This commit is contained in:
menaechmi
2024-11-06 16:53:58 -06:00
committed by Jordan Harband
parent d648a3b1ba
commit cd22c84026
2 changed files with 33 additions and 8 deletions

View File

@@ -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