mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25:00 +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.coder import Coder
|
||||||
from aider.io import InputOutput
|
from aider.io import InputOutput
|
||||||
|
|
||||||
|
|
||||||
def get_git_root():
|
def get_git_root():
|
||||||
try:
|
try:
|
||||||
repo = git.Repo(search_parent_directories=True)
|
repo = git.Repo(search_parent_directories=True)
|
||||||
|
@ -14,7 +15,6 @@ def get_git_root():
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def main(args=None, input=None, output=None):
|
def main(args=None, input=None, output=None):
|
||||||
if args is None:
|
if args is None:
|
||||||
args = sys.argv[1:]
|
args = sys.argv[1:]
|
||||||
|
@ -22,13 +22,12 @@ def main(args=None, input=None, output=None):
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
env_prefix = "AIDER_"
|
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 = [
|
default_config_files = [
|
||||||
os.path.expanduser("~/.aider.conf.yml"),
|
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(
|
parser = configargparse.ArgumentParser(
|
||||||
description="aider - chat with GPT about your code",
|
description="aider - chat with GPT about your code",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue