File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -22,9 +22,22 @@ async def __call__(
2222 raise ToolError ("no command provided" )
2323
2424 try :
25- # Create process with shell=True to handle all bash features properly
25+ # Set up non-interactive environment
26+ env = os .environ .copy ()
27+ env .update (
28+ {
29+ "DEBIAN_FRONTEND" : "noninteractive" , # Prevents apt from prompting
30+ "NONINTERACTIVE" : "1" , # Generic non-interactive flag
31+ }
32+ )
33+
34+ # Create process with shell=True and stdin set to DEVNULL
2635 process = await asyncio .create_subprocess_shell (
27- command , stdout = asyncio .subprocess .PIPE , stderr = asyncio .subprocess .PIPE
36+ command ,
37+ stdout = asyncio .subprocess .PIPE ,
38+ stderr = asyncio .subprocess .PIPE ,
39+ stdin = asyncio .subprocess .DEVNULL , # Explicitly disable stdin
40+ env = env ,
2841 )
2942
3043 try :
You can’t perform that action at this time.
0 commit comments