Skip to content

fix: ignore directory config candidates - #5915

Open
19anveshh wants to merge 1 commit into
Aider-AI:mainfrom
19anveshh:issue-5909-ignore-directory-config
Open

19anveshh wants to merge 1 commit into
Aider-AI:mainfrom
19anveshh:issue-5909-ignore-directory-config

Conversation

@19anveshh

Copy link
Copy Markdown

Fixes #5909

A directory named .aider.conf.yml in a default config location is passed to configargparse as a config file. This raises IsADirectoryError on Unix or PermissionError on Windows before Aider starts.

Filter the default config candidates to regular files while preserving explicit --config handling, and add a regression test for a directory in the home config location.

Tests:

  • python -m pytest -q tests/basic/test_main.py -k 'yaml_config_file_loading or directory_in_default_config_path_is_ignored'
  • python -m pytest -q tests/basic/test_main.py (77 passed)
  • pre-commit run --files aider/main.py tests/basic/test_main.py (all hooks passed)

AI assistance was used for investigation and drafting; the reproduction, implementation, and test results were reviewed before submission.

This branch has not been deployed

No deployments
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 IsADirectoryError in configargparse.py line 1216

1 participant