diff --git a/zinit.zsh b/zinit.zsh index 5a57c6c37..94343e344 100644 --- a/zinit.zsh +++ b/zinit.zsh @@ -1320,8 +1320,9 @@ builtin setopt noaliases command mkdir 2>/dev/null -p ${~ZINIT[MAN_DIR]}/man{1..9} } # Copy Zinit manpage so that man is able to find it - [[ ! -f $ZINIT[MAN_DIR]/man1/zinit.1 || \ - $ZINIT[MAN_DIR]/man1/zinit.1 -ot $ZINIT[BIN_DIR]/doc/zinit.1 ]] && { + [[ ! -f $ZINIT[MAN_DIR]/man1/zinit.1 || \ # check for dest file NOT exists + $ZINIT[MAN_DIR]/man1/zinit.1 -ot $ZINIT[BIN_DIR]/doc/zinit.1 ]] && + [[ -f $ZINIT[BIN_DIR]/doc/zinit.1 ]] && { # check for source file exists command mkdir -p $ZINIT[MAN_DIR]/man1 command cp -f $ZINIT[BIN_DIR]/doc/zinit.1 $ZINIT[MAN_DIR]/man1 }