You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(check): expand env vars in --rev-range (#2005)
The packaged commitizen-branch pre-push hook in .pre-commit-hooks.yaml
passes the literal string \..\ as
an argv element and relied on shell expansion. After #1941 switched git
execution to shell=False (CWE-78 hardening), git received the literal
string and aborted with atal: ambiguous argument, breaking every
commitizen release after v4.15.0 for users of that hook.
Expand env vars explicitly on the --rev-range argument via
os.path.expandvars so the hook keeps working without reintroducing
shell execution. Unset variables are left literal so git surfaces a
clear error instead of being silently rewritten to an empty range.
Closes#2003
Co-authored-by: Tim Hsiung <26526132+bearomorphism@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments