fix: handle spaces in ESLint file path for TypeScript linting

This commit is contained in:
Paul Gauthier 2024-09-04 14:05:44 -07:00 committed by Paul Gauthier (aider)
parent 7c5d999032
commit 867d19952c

View file

@ -39,8 +39,8 @@ class Linter:
if path:
for name in eslint_names:
eslint_file = path / name
if eslint_file.is_file():
self.languages["typescript"] = f'"{eslint_file}" --format unix'
if eslint_file.is_file() and " " not in eslint_file:
self.languages["typescript"] = f"{eslint_file} --format unix"
return
def set_linter(self, lang, cmd):