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

@uranusjr uranusjr commented Jun 19, 2018

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

@uranusjr uranusjr commented Jun 19, 2018

Need #2386 first for this to work.

@techalchemy
Copy link
Member

@techalchemy techalchemy commented Jun 22, 2018

Hm yeah this makes sense to me.

@techalchemy
Copy link
Member

@techalchemy techalchemy commented Jun 22, 2018

Tested this out locally on windows and it seems good

@techalchemy techalchemy merged commit fde4a89 into master Jun 22, 2018
0 of 2 checks passed
0 of 2 checks passed
continuous-integration/appveyor/pr AppVeyor build cancelled
Details
buildkite/pipenv Build #492 started
Details
@techalchemy techalchemy deleted the avoid-shell-in-run-if-possible branch Jun 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants