diff options
author | Carlo <carlosalag@protonmail.com> | 2022-11-20 08:36:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-20 08:36:20 +0100 |
commit | d93f3174504f8a0c21aef6998714e3b67ba82606 (patch) | |
tree | 27235d23f766e335522acf5703553dc6a8d16876 | |
parent | 5ab517361a4215d2f777023fc1e772fe79496713 (diff) | |
download | zsh-d93f3174504f8a0c21aef6998714e3b67ba82606.tar.gz zsh-d93f3174504f8a0c21aef6998714e3b67ba82606.tar.bz2 zsh-d93f3174504f8a0c21aef6998714e3b67ba82606.zip |
fix(init): prevent multiple compdump compilations (#11345)
Closes #11341
-rw-r--r-- | oh-my-zsh.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 29d39ca23..e94c2f417 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -143,7 +143,10 @@ fi unset zcompdump_revision zcompdump_fpath zcompdump_refresh # zcompile the completion dump file if the .zwc is older or missing. -zrecompile -q -p "$ZSH_COMPDUMP" && command rm -f "$ZSH_COMPDUMP.zwc.old" +if command mkdir "${ZSH_COMPDUMP}.lock" 2>/dev/null; then + zrecompile -q -p "$ZSH_COMPDUMP" + command rm -rf "$ZSH_COMPDUMP.zwc.old" "${ZSH_COMPDUMP}.lock" +fi # Load all of the config files in ~/oh-my-zsh that end in .zsh # TIP: Add files you don't want in git to .gitignore |