]> arthur.barton.de Git - ax-zsh.git/commitdiff
ax.zsh: Don't call mkdir(1) unconditionally
authorAlexander Barton <alex@barton.de>
Mon, 29 Mar 2021 17:46:32 +0000 (19:46 +0200)
committerAlexander Barton <alex@barton.de>
Mon, 29 Mar 2021 17:46:32 +0000 (19:46 +0200)
ax.zsh

diff --git a/ax.zsh b/ax.zsh
index a3e29ba88843cdc97bc27460d757f29919d50498..12fab140a3a589ac114524a214d0ba094326e115 100644 (file)
--- a/ax.zsh
+++ b/ax.zsh
@@ -29,7 +29,7 @@ function axzsh_handle_stage {
        fi
 
        # Initialize cache
-       mkdir -p "$AXZSH/cache"
+       [[ -d "$AXZSH/cache" ]] || mkdir -p "$AXZSH/cache"
        local cache_file="$AXZSH/cache/$type.cache"
 
        local cat_cmd=${commands[cat]:-cat}