fix: honor explicit Windows cmd shell path
Maintainer edit: launch explicit cmd shells as cmd.exe /c so COMSPEC or absolute cmd.exe paths are actually used.
This commit is contained in:
1 parent
4ec111c1a9
commit
8c4a74ee3c
2 files changed
+14
-12
No files matched your search
@@ -491,8 +491,8 @@ class ExecTool(Tool):
|
||||
program = shell_program or default_program
|
||||
program_name = PureWindowsPath(program).name.lower()
|
||||
if program_name in ("cmd", "cmd.exe"):
|
||||
return await asyncio.create_subprocess_shell(
|
||||
command,
|
||||
return await asyncio.create_subprocess_exec(
|
||||
program, "/c", command,
|
||||
stdin=stdin,
|
||||
stdout=asyncio.subprocess.PIPE,
|
||||
stderr=asyncio.subprocess.PIPE,
|
||||
|
||||
Reference in new issue
Block a user