mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-04 19:55:00 +00:00
refactor: change working directory before returning in setup_git_home
This commit is contained in:
parent
abb94fc582
commit
f5bc657027
1 changed files with 2 additions and 0 deletions
|
@ -47,6 +47,7 @@ def setup_git_home(io):
|
||||||
choice_num = int(choice)
|
choice_num = int(choice)
|
||||||
if 1 <= choice_num <= len(git_repos):
|
if 1 <= choice_num <= len(git_repos):
|
||||||
chosen_repo = git_repos[choice_num - 1]
|
chosen_repo = git_repos[choice_num - 1]
|
||||||
|
os.chdir(chosen_repo.parent)
|
||||||
return str(chosen_repo.parent)
|
return str(chosen_repo.parent)
|
||||||
else:
|
else:
|
||||||
io.tool_error(f"Please enter a number between 1 and {len(git_repos)}")
|
io.tool_error(f"Please enter a number between 1 and {len(git_repos)}")
|
||||||
|
@ -54,6 +55,7 @@ def setup_git_home(io):
|
||||||
choice_lower = choice.lower()
|
choice_lower = choice.lower()
|
||||||
if choice_lower in repo_dict:
|
if choice_lower in repo_dict:
|
||||||
chosen_repo = repo_dict[choice_lower]
|
chosen_repo = repo_dict[choice_lower]
|
||||||
|
os.chdir(chosen_repo.parent)
|
||||||
return str(chosen_repo.parent)
|
return str(chosen_repo.parent)
|
||||||
else:
|
else:
|
||||||
io.tool_error("Please enter a valid number or repository name")
|
io.tool_error("Please enter a valid number or repository name")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue