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

Don't use shell to run vagrant subprocess #112

Merged
merged 1 commit into from
Mar 30, 2022

Conversation

apatard
Copy link
Collaborator

@apatard apatard commented Mar 30, 2022

There's no need to have an overhead of a shell and it's often
considered bad practice, so convert all subprocess calls to
not use a shell.

Signed-off-by: Arnaud Patard apatard@hupstream.com

Copy link
Collaborator

@konstruktoid konstruktoid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we ensure a shell isn't used by setting shell=False?
i know it's the default, but just to be on the safe side?

@apatard
Copy link
Collaborator Author

apatard commented Mar 30, 2022

should we ensure a shell isn't used by setting shell=False? i know it's the default, but just to be on the safe side?

That's indeed a good question. I was relying on the default value, but yeah, the default can always be changed later.
I don't have any problem adding it. @ssbarnea ? what's your opinion ?

Copy link
Collaborator

@konstruktoid konstruktoid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer shell=False, but otherwise lgtm

@ssbarnea ssbarnea changed the title tests/test_vagrant.py: Don't use shell to run vagrant Don't use shell to run vagrant subprocess Mar 30, 2022
@ssbarnea ssbarnea added the bug label Mar 30, 2022
@ssbarnea
Copy link
Member

@apatard please rebase and merge once passing.

There's no need to have an overhead of a shell and it's often
considered bad practice, so convert all subprocess calls to
not use a shell.

Signed-off-by: Arnaud Patard <apatard@hupstream.com>
@apatard apatard merged commit 86933da into pycontribs:main Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants