Skip to content

Handle missing cwd when probing git root#4910

Open
Alix-007 wants to merge 1 commit intoAider-AI:mainfrom
Alix-007:fix/get-git-root-nosuchpath-20260312
Open

Handle missing cwd when probing git root#4910
Alix-007 wants to merge 1 commit intoAider-AI:mainfrom
Alix-007:fix/get-git-root-nosuchpath-20260312

Conversation

@Alix-007
Copy link
Copy Markdown

Fixes #4862.

What changed:

  • treat git.exc.NoSuchPathError the same as other missing-repo startup cases
  • return None from get_git_root() instead of crashing when the current directory no longer exists
  • add a regression test covering the missing-CWD path

Validation:

  • python -m unittest tests.basic.test_main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Uncaught NoSuchPathError in base.py line 235

1 participant