Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution is always as a shell #100

Closed
KotlinIsland opened this issue Mar 22, 2023 · 2 comments · Fixed by #101
Closed

Execution is always as a shell #100

KotlinIsland opened this issue Mar 22, 2023 · 2 comments · Fixed by #101
Labels
bug Something isn't working

Comments

@KotlinIsland
Copy link
Contributor

KotlinIsland commented Mar 22, 2023

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.

@ssbarnea
Copy link
Member

ssbarnea commented May 6, 2023

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 ssbarnea changed the title (🐞) Execution is always as a shell Execution is always as a shell May 6, 2023
@ssbarnea ssbarnea added the bug Something isn't working label May 6, 2023
@bmccutchon
Copy link

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

jonashaag added a commit to jonashaag/subprocess-tee that referenced this issue Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants