mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 10:14:59 +00:00
refactor: Move git check after env loading
This commit is contained in:
parent
f62ef34715
commit
db98381a86
1 changed files with 3 additions and 3 deletions
|
@ -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)
|
args, unknown = parser.parse_known_args(argv)
|
||||||
|
|
||||||
if git is None:
|
|
||||||
args.git = False
|
|
||||||
|
|
||||||
# Load the .env file specified in the arguments
|
# Load the .env file specified in the arguments
|
||||||
loaded_dotenvs = load_dotenv_files(git_root, args.env_file, args.encoding)
|
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
|
# Parse again to include any arguments that might have been defined in .env
|
||||||
args = parser.parse_args(argv)
|
args = parser.parse_args(argv)
|
||||||
|
|
||||||
|
if git is None:
|
||||||
|
args.git = False
|
||||||
|
|
||||||
if args.analytics_disable:
|
if args.analytics_disable:
|
||||||
analytics = Analytics(permanently_disable=True)
|
analytics = Analytics(permanently_disable=True)
|
||||||
print("Analytics have been permanently disabled.")
|
print("Analytics have been permanently disabled.")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue