mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-08 05:34:59 +00:00
fix: handle ValueError in os.path.relpath calls
This commit is contained in:
parent
937a1cd847
commit
6152a82513
2 changed files with 8 additions and 2 deletions
|
@ -52,7 +52,10 @@ class Linter:
|
|||
|
||||
def get_rel_fname(self, fname):
|
||||
if self.root:
|
||||
return os.path.relpath(fname, self.root)
|
||||
try:
|
||||
return os.path.relpath(fname, self.root)
|
||||
except ValueError:
|
||||
return fname
|
||||
else:
|
||||
return fname
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue