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

Projects
None yet
2 participants
@uranusjr
Member

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.

Use shell=False when "run" if possible on Windows
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

This comment has been minimized.

Member

uranusjr commented Jun 19, 2018

Need #2386 first for this to work.

@uranusjr uranusjr added DO NOT MERGE and removed DO NOT MERGE labels Jun 19, 2018

@techalchemy

This comment has been minimized.

Member

techalchemy commented Jun 22, 2018

Hm yeah this makes sense to me.

techalchemy added some commits Jun 22, 2018

Added news item for feature
Signed-off-by: Dan Ryan <dan@danryan.co>
@techalchemy

This comment has been minimized.

Member

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

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