diff options
author | Marc Cornellà <hello@mcornella.com> | 2022-02-21 20:28:40 +0100 |
---|---|---|
committer | Marc Cornellà <hello@mcornella.com> | 2022-02-21 20:30:06 +0100 |
commit | b00b59364a019894ee4b9ba4062d922fedaa5ccd (patch) | |
tree | 98162904d13ab33fa7faab71bccd85b3e48ec372 /lib | |
parent | ebfd7cb2191bdf02ebdc2df6c47697d3a9d195e3 (diff) | |
download | zsh-b00b59364a019894ee4b9ba4062d922fedaa5ccd.tar.gz zsh-b00b59364a019894ee4b9ba4062d922fedaa5ccd.tar.bz2 zsh-b00b59364a019894ee4b9ba4062d922fedaa5ccd.zip |
fix(vcs_info): don't patch VCS_INFO_formats if not found
Diffstat (limited to 'lib')
-rw-r--r-- | lib/vcs_info.zsh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vcs_info.zsh b/lib/vcs_info.zsh index edb515ce0..e60938c14 100644 --- a/lib/vcs_info.zsh +++ b/lib/vcs_info.zsh @@ -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]//\%/%%}"' |