Skip to content

Commit 16004c5

Browse files
authored
Merge pull request #4 from jaraco/bugfix/any-filename
Let subprocess module handle argument escaping
2 parents 4c2608d + 52c0ac9 commit 16004c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pytest_ruff.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ def reportinfo(self):
8181

8282
def check_file(path):
8383
ruff = find_ruff_bin()
84-
command = f"{ruff} {path} --quiet --show-source"
85-
child = Popen(command, shell=True, stdout=PIPE, stderr=PIPE)
84+
command = [ruff, path, '--quiet', '--show-source']
85+
child = Popen(command, stdout=PIPE, stderr=PIPE)
8686
stdout, _ = child.communicate()
8787
if stdout:
8888
raise RuffError(stdout.decode())

0 commit comments

Comments
 (0)