subprocess-tee icon indicating copy to clipboard operation
subprocess-tee copied to clipboard

Execution is always as a shell

Open KotlinIsland opened this issue 2 years ago • 2 comments

When there is no space in the command

subprocess.run(["a"])

Will not use the shell, but with:

subprocess_tee.run(["a"])

will be run as a shell.

I think it would be fairly simple to update the functionality to use create_subprocess_shell if a string is passed, and create_subprocess_exec if a iterable is passed.

KotlinIsland avatar Mar 22 '23 07:03 KotlinIsland

This was not really by accident, it was more of by design. Still, I would not refuse a change that makes it behave more like subprocess.run, where you can also specify shell as true or not.

ssbarnea avatar May 06 '23 07:05 ssbarnea

Would you accept a change that makes shell=False by default? shell=True really shouldn't be the default, since it's dangerous.

bmccutchon avatar Aug 04 '23 16:08 bmccutchon