Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion aider/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ def get_git_root():
try:
repo = git.Repo(search_parent_directories=True)
return repo.working_tree_dir
except (git.InvalidGitRepositoryError, FileNotFoundError):
except (git.InvalidGitRepositoryError, git.NoSuchPathError, FileNotFoundError):
# Windows paths containing `$` (e.g. `F:\$data\...` from
# `mklink /D`-style mounts) reach here as `NoSuchPathError`
# because git-python resolves them through the parent search and
# fails the existence check (#2957). Treat the same as no repo,
# aider operates without one, instead of crashing on startup.
return None


Expand Down