mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-04-21 22:03:28 +02:00
init: silence zcompdump metadata write for invalid ZSH_COMPDUMP filenames
If `$SHORT_HOST` contains invalid filename characters, the compinit call doesn't error, but the zcompdump metadata write does. Use `tee` instead so we can silence the error. See https://github.com/ohmyzsh/ohmyzsh/commit/dd1a72696f162fd5285a104b5f63970deb66e8b0#commitcomment-38984764
This commit is contained in:
+1
-1
@@ -86,7 +86,7 @@ fi
|
|||||||
|
|
||||||
# Append zcompdump metadata if missing
|
# Append zcompdump metadata if missing
|
||||||
if (( $zcompdump_refresh )); then
|
if (( $zcompdump_refresh )); then
|
||||||
echo "\n$zcompdump_metadata" >>! "$ZSH_COMPDUMP"
|
echo "\n$zcompdump_metadata" | tee -a "$ZSH_COMPDUMP" &>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unset zcompdump_metadata zcompdump_refresh
|
unset zcompdump_metadata zcompdump_refresh
|
||||||
|
|||||||
Reference in New Issue
Block a user