File tree 1 file changed +3
-6
lines changed
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -260,16 +260,13 @@ async def cv_to_webp(self, animated: bool = True) -> bytes:
260
260
return buf
261
261
262
262
async def call (self , cmd : List [str ]):
263
- if any (" " in part for part in cmd ):
264
- cmd_str = shlex .join (cmd )
265
- else :
266
- cmd_str = " " .join (cmd )
263
+ cmd_str = shlex .join (cmd ) if any (" " in part for part in cmd ) else " " .join (cmd )
267
264
popen = await asyncio .create_subprocess_shell (
268
- cmd_str ,
265
+ cmd_str if os . name == "nt" else shlex . join ( cmd ) ,
269
266
stderr = asyncio .subprocess .PIPE ,
270
267
stdout = asyncio .subprocess .PIPE ,
271
268
stdin = subprocess .DEVNULL ,
272
- shell = True if os .name == "nt" else False ,
269
+ # shell=True if os.name == "nt" else False,
273
270
)
274
271
stdout , stderr = await popen .communicate () # type: ignore
275
272
if popen .returncode != 0 :
You can’t perform that action at this time.
0 commit comments