From 5c1505fc52be1fd366646a81ec5e4407085ab903 Mon Sep 17 00:00:00 2001 From: my1e5 <10064103+my1e5@users.noreply.github.com> Date: Fri, 17 May 2024 13:01:15 +0100 Subject: [PATCH] fix: set shell to False if running subprocess on Windows --- commitizen/cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commitizen/cmd.py b/commitizen/cmd.py index ba48ac7881..7f2b6b0f33 100644 --- a/commitizen/cmd.py +++ b/commitizen/cmd.py @@ -33,7 +33,7 @@ def run(cmd: str, env=None) -> Command: env = {**os.environ, **env} process = subprocess.Popen( cmd, - shell=True, + shell=False if os.name == 'nt' else True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE,