From 992edcc17dc7c2892bd780674bde252a8f1fd91f Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Mon, 7 Sep 2026 01:12:56 -0700 Subject: [PATCH] perf(init): only mkdir the cache completions dir when it's missing (#14065) --- oh-my-zsh.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index b4e95e0ff..e7a9254af 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -64,7 +64,7 @@ if [[ ! -w "$ZSH_CACHE_DIR" ]]; then fi # Create cache and completions dir and add to $fpath -mkdir -p "$ZSH_CACHE_DIR/completions" +[[ -d "$ZSH_CACHE_DIR/completions" ]] || mkdir -p "$ZSH_CACHE_DIR/completions" (( ${fpath[(Ie)$ZSH_CACHE_DIR/completions]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath) # Check for updates on initial load...