subprocess-tee
subprocess-tee copied to clipboard
Execution is always as a shell
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.
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.
Would you accept a change that makes shell=False by default? shell=True really shouldn't be the default, since it's dangerous.