From db98381a86eeca4d6b1da2f3afc0365ea35c6352 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sat, 14 Dec 2024 09:44:42 -0800 Subject: [PATCH] refactor: Move git check after env loading --- aider/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aider/main.py b/aider/main.py index 3fed8ca98..58de4074e 100644 --- a/aider/main.py +++ b/aider/main.py @@ -460,15 +460,15 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F args, unknown = parser.parse_known_args(argv) - if git is None: - args.git = False - # Load the .env file specified in the arguments loaded_dotenvs = load_dotenv_files(git_root, args.env_file, args.encoding) # Parse again to include any arguments that might have been defined in .env args = parser.parse_args(argv) + if git is None: + args.git = False + if args.analytics_disable: analytics = Analytics(permanently_disable=True) print("Analytics have been permanently disabled.")