From d0fdb2f55b5f927d3c558898cc60c22fb4d1f937 Mon Sep 17 00:00:00 2001 From: my1e5 <10064103+my1e5@users.noreply.github.com> Date: Mon, 20 May 2024 10:47:44 +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..4ae1b3bd30 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,