mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 09:44:59 +00:00
fix
This commit is contained in:
parent
6b5c93f046
commit
7fe7f1e279
1 changed files with 4 additions and 5 deletions
|
@ -6,6 +6,7 @@ from dotenv import load_dotenv
|
|||
from aider.coder import Coder
|
||||
from aider.io import InputOutput
|
||||
|
||||
|
||||
def get_git_root():
|
||||
try:
|
||||
repo = git.Repo(search_parent_directories=True)
|
||||
|
@ -14,7 +15,6 @@ def get_git_root():
|
|||
return None
|
||||
|
||||
|
||||
|
||||
def main(args=None, input=None, output=None):
|
||||
if args is None:
|
||||
args = sys.argv[1:]
|
||||
|
@ -22,13 +22,12 @@ def main(args=None, input=None, output=None):
|
|||
load_dotenv()
|
||||
env_prefix = "AIDER_"
|
||||
|
||||
git_root = get_git_root()
|
||||
if git_root:
|
||||
default_config_files.insert(0, os.path.join(git_root, ".aider.conf.yml"))
|
||||
|
||||
default_config_files = [
|
||||
os.path.expanduser("~/.aider.conf.yml"),
|
||||
]
|
||||
git_root = get_git_root()
|
||||
if git_root:
|
||||
default_config_files.insert(0, os.path.join(git_root, ".aider.conf.yml"))
|
||||
|
||||
parser = configargparse.ArgumentParser(
|
||||
description="aider - chat with GPT about your code",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue