Browse Source

fix(installer): fix path logic and improve clarity on ZDOTDIR use

Marc Cornellà 5 months ago
parent
commit
b6afbbea3a
1 changed files with 3 additions and 1 deletions
  1. 3 1
      tools/install.sh

+ 3 - 1
tools/install.sh

@@ -63,7 +63,9 @@ zdot="${ZDOTDIR:-$HOME}"
 # Default value for $ZSH
 # a) if $ZDOTDIR is supplied and not $HOME: $ZDOTDIR/ohmyzsh
 # b) otherwise, $HOME/.oh-my-zsh
-[ "$ZDOTDIR" = "$HOME" ] || ZSH="${ZSH:-${ZDOTDIR:+$ZDOTDIR/ohmyzsh}}"
+if [ -n "$ZDOTDIR" ] && [ "$ZDOTDIR" != "$HOME" ]; then
+  ZSH="${ZSH:-$ZDOTDIR/ohmyzsh}"
+fi
 ZSH="${ZSH:-$HOME/.oh-my-zsh}"
 
 # Default settings