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

Use shell=False when "run" if possible on Windows #2385

Merged
merged 3 commits into from
Jun 22, 2018

Conversation

uranusjr
Copy link
Member

Do a where on the command; if it is found, prevent the intermediate COMSPEC and use CreateProcess directly. Only use shell=True if the command is not an executable.

This prevents some unexpected behaviour caused by the intermediate shell process.

Do a "where" on the command; if it is found, prevent the intermediate
COMSPEC and use CreateProcess directly. Only use shell=True if the command
is not an executable.

This prevents some unexpected behaviour caused by the intermediate shell
process.
@uranusjr
Copy link
Member Author

Need #2386 first for this to work.

@techalchemy
Copy link
Member

Hm yeah this makes sense to me.

@techalchemy
Copy link
Member

Tested this out locally on windows and it seems good

@techalchemy techalchemy added Type: Enhancement 💡 This is a feature or enhancement request. OS: Windows This issue affects the Windows Operating System. labels Jun 22, 2018
@techalchemy techalchemy merged commit fde4a89 into master Jun 22, 2018
@techalchemy techalchemy deleted the avoid-shell-in-run-if-possible branch June 22, 2018 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS: Windows This issue affects the Windows Operating System. Type: Enhancement 💡 This is a feature or enhancement request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants