mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
feat: Conditionally add .env to .gitignore based on file existence
This commit is contained in:
parent
bc2f38c790
commit
e7d979ca74
1 changed files with 2 additions and 2 deletions
|
@ -163,8 +163,8 @@ def check_gitignore(git_root, io, ask=True):
|
|||
if not repo.ignored(".aider"):
|
||||
patterns_to_add.append(".aider*")
|
||||
|
||||
# only check .env if git_root/.env exists ai!
|
||||
if not repo.ignored(".env"):
|
||||
env_path = Path(git_root) / ".env"
|
||||
if env_path.exists() and not repo.ignored(".env"):
|
||||
patterns_to_add.append(".env")
|
||||
|
||||
if not patterns_to_add:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue