From 867d19952c52e04d29ca1e646119185d4389867f Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 4 Sep 2024 14:05:44 -0700 Subject: [PATCH] fix: handle spaces in ESLint file path for TypeScript linting --- aider/linter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/linter.py b/aider/linter.py index 566bcfb68..e682c9882 100644 --- a/aider/linter.py +++ b/aider/linter.py @@ -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):