mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
Merge pull request #3192 from miradnanali/fix-filename-quoting-for-lint
fix: Use shlex.quote() to enable linting filepaths containing shell metacharacters
This commit is contained in:
commit
8df5406986
1 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@ import subprocess
|
|||
import sys
|
||||
import traceback
|
||||
import warnings
|
||||
import shlex
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
|
||||
|
@ -44,7 +45,7 @@ class Linter:
|
|||
return fname
|
||||
|
||||
def run_cmd(self, cmd, rel_fname, code):
|
||||
cmd += " " + rel_fname
|
||||
cmd += " " + shlex.quote(rel_fname)
|
||||
|
||||
returncode = 0
|
||||
stdout = ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue