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

Remove shell=True #467

Merged
merged 3 commits into from
Apr 14, 2016
Merged

Remove shell=True #467

merged 3 commits into from
Apr 14, 2016

Conversation

suchow
Copy link
Member

@suchow suchow commented Apr 12, 2016

No description provided.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 15.13% when pulling e4a5e9e on shell-equals-true into 925812d on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.09%) to 15.219% when pulling e4a5e9e on shell-equals-true into 925812d on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 15.371% when pulling 2bb9f65 on shell-equals-true into e8dfe26 on master.

@suchow suchow merged commit 91dd002 into master Apr 14, 2016
@suchow suchow deleted the shell-equals-true branch July 25, 2016 10:18
@@ -37,20 +37,24 @@ def timing_test(corpus="0.1.0"):
for file in os.listdir(corpus_path):
filepath = os.path.join(corpus_path, file)
if ".md" == filepath[-3:]:
subprocess.call(
"proselint {} >/dev/null".format(filepath), shell=True)
subprocess.call(["proselint", filepath, ">/dev/null"])
Copy link

Choose a reason for hiding this comment

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

This doesn't really work. Without using shell=True, the > is just another character, so you're just passing an extra file name. You can redirect using something like stdout=subprocess.DEVNULL.

@@ -2,4 +2,4 @@

import subprocess

subprocess.call("proselint --debug >/dev/null", shell=True)
subprocess.call(["proselint", "--debug", ">/dev/null"])
Copy link

Choose a reason for hiding this comment

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

The same thing applies here (though you've added shell=True back on master).

@suchow
Copy link
Member Author

suchow commented Sep 4, 2017

@QuLogic Thanks for the review! Would you be interested & willing to open a PR that does all this correctly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants