From a9b3fccce86b53bfff8e8cf434fb0b968b3efab5 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 28 Aug 2024 16:15:51 -0700 Subject: [PATCH] Do not make .git in $HOME --- aider/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aider/main.py b/aider/main.py index f35b2fd49..d1da3b5aa 100644 --- a/aider/main.py +++ b/aider/main.py @@ -62,6 +62,9 @@ def setup_git(git_root, io): if git_root: repo = git.Repo(git_root) + elif Path.cwd() == Path.home(): + io.tool_error("You should probably run aider in a directory, not your home dir.") + return elif io.confirm_ask("No git repo found, create one to track aider's changes (recommended)?"): git_root = str(Path.cwd().resolve()) repo = make_new_repo(git_root, io)