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

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

No files matched your search

+4 -4
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