fix(exec): detach stdin for shell commands
This commit is contained in:
@@ -266,6 +266,7 @@ class ExecTool(Tool):
|
||||
# the raw command string to COMSPEC without re-quoting.
|
||||
return await asyncio.create_subprocess_shell(
|
||||
command,
|
||||
stdin=asyncio.subprocess.DEVNULL,
|
||||
stdout=asyncio.subprocess.PIPE,
|
||||
stderr=asyncio.subprocess.PIPE,
|
||||
cwd=cwd,
|
||||
@@ -274,6 +275,7 @@ class ExecTool(Tool):
|
||||
bash = shutil.which("bash") or "/bin/bash"
|
||||
return await asyncio.create_subprocess_exec(
|
||||
bash, "-l", "-c", command,
|
||||
stdin=asyncio.subprocess.DEVNULL,
|
||||
stdout=asyncio.subprocess.PIPE,
|
||||
stderr=asyncio.subprocess.PIPE,
|
||||
cwd=cwd,
|
||||
|
||||
Reference in New Issue
Block a user