-
Notifications
You must be signed in to change notification settings - Fork 178
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
Remove shell=True
#467
Conversation
09fe1ab
to
e4a5e9e
Compare
e4a5e9e
to
2bb9f65
Compare
@@ -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"]) |
There was a problem hiding this comment.
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"]) |
There was a problem hiding this comment.
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
).
@QuLogic Thanks for the review! Would you be interested & willing to open a PR that does all this correctly? |
No description provided.