Skip to content

Commit

Permalink
Merge pull request #4 from jaraco/bugfix/any-filename
Browse files Browse the repository at this point in the history
Let subprocess module handle argument escaping
  • Loading branch information
iurisilvio authored Jul 31, 2023
2 parents 4c2608d + 52c0ac9 commit 16004c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pytest_ruff.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ def reportinfo(self):

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

0 comments on commit 16004c5

Please sign in to comment.