Skip to content

Commit 4c5854b

Browse files
authored
Merge pull request #241 from jankatins/fix_plugins_dir_setup
fix: Don't error if $OPTS is not yet defined in .zinit-compinit call
2 parents 49af866 + 44765e0 commit 4c5854b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

zinit-install.zsh

+2-1
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,8 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
601601
#
602602
# No arguments.
603603
.zinit-compinit() {
604-
[[ -n ${OPTS[opt_-p,--parallel]} && $1 != 1 ]] && return
604+
# This might be called during sourcing when setting up the plugins dir, so check that OPTS is actually existing
605+
[[ -n $OPTS && -n ${OPTS[opt_-p,--parallel]} && $1 != 1 ]] && return
605606

606607
emulate -LR zsh
607608
builtin setopt nullglob extendedglob warncreateglobal typesetsilent

0 commit comments

Comments
 (0)