0
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-09-12 04:01:14 +02:00

fix(vcs_info): don't patch VCS_INFO_formats if not found

This commit is contained in:
Marc Cornellà 2022-02-21 20:28:40 +01:00
parent ebfd7cb219
commit b00b59364a
No known key found for this signature in database
GPG key ID: 0314585E776A9C1B

View file

@ -38,7 +38,7 @@
# due to malicious input as a consequence of CVE-2021-45444, which affects
# zsh versions from 5.0.3 to 5.8.
#
autoload -Uz +X regexp-replace VCS_INFO_formats
autoload -Uz +X regexp-replace VCS_INFO_formats 2>/dev/null || return
# We use $tmp here because it's already a local variable in VCS_INFO_formats
typeset PATCH='for tmp (base base-name branch misc revision subdir) hook_com[$tmp]="${hook_com[$tmp]//\%/%%}"'