summaryrefslogtreecommitdiff
path: root/lib/vcs_info.zsh
diff options
context:
space:
mode:
authorMarc Cornellà <hello@mcornella.com>2023-02-24 17:27:23 +0100
committerMarc Cornellà <hello@mcornella.com>2023-02-24 17:27:23 +0100
commit5cb943eea46d322542c5c2a9f54b201eddc2aa67 (patch)
tree072b95bb76b0c6eb96ea01cd2932d6469e22e44f /lib/vcs_info.zsh
parentbd9c216fe04a1542913f524cad1719797ce39ba2 (diff)
downloadzsh-5cb943eea46d322542c5c2a9f54b201eddc2aa67.tar.gz
zsh-5cb943eea46d322542c5c2a9f54b201eddc2aa67.tar.bz2
zsh-5cb943eea46d322542c5c2a9f54b201eddc2aa67.zip
fix(lib): fix return code after expected non-zero exit code (#11524)
Fixes #11524
Diffstat (limited to 'lib/vcs_info.zsh')
-rw-r--r--lib/vcs_info.zsh2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vcs_info.zsh b/lib/vcs_info.zsh
index e60938c14..be6d32ee9 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 2>/dev/null || return
+autoload -Uz +X regexp-replace VCS_INFO_formats 2>/dev/null || return 0
# 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]//\%/%%}"'