Skip to content

fix: handle git config lock errors gracefully#5084

Open
Kcstring wants to merge 1 commit intoAider-AI:mainfrom
Kcstring:fix-git-config-lock-crash
Open

fix: handle git config lock errors gracefully#5084
Kcstring wants to merge 1 commit intoAider-AI:mainfrom
Kcstring:fix-git-config-lock-crash

Conversation

@Kcstring
Copy link
Copy Markdown

Summary

  • catch OSError from repo.config_writer() in setup_git()
  • warn the user how to set user.name and user.email manually instead of crashing when .git/config.lock exists
  • add a regression test for the locked config path

Testing

  • python3 -m pytest tests/basic/test_main.py -k "setup_git or config_writer_lock"
  • python3 -m ruff check aider/main.py tests/basic/test_main.py

Fixes #5060

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 OSError in util.py line 1045

1 participant