mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 02:34:59 +00:00
Automatically install the new aider version
This commit is contained in:
parent
6c2a168327
commit
6c38306eab
6 changed files with 49 additions and 35 deletions
|
@ -181,7 +181,8 @@ def split_chat_history_markdown(text, include_tool=False):
|
|||
return messages
|
||||
|
||||
|
||||
def pip_install(args):
|
||||
def get_pip_install(args):
|
||||
|
||||
cmd = [
|
||||
sys.executable,
|
||||
"-m",
|
||||
|
@ -189,10 +190,12 @@ def pip_install(args):
|
|||
"install",
|
||||
]
|
||||
cmd += args
|
||||
return cmd
|
||||
|
||||
run_install_with_spinner(cmd)
|
||||
def run_install(cmd):
|
||||
print()
|
||||
print("Installing: ", ' '.join(cmd))
|
||||
|
||||
def run_install_with_spinner(cmd):
|
||||
try:
|
||||
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, bufsize=1, universal_newlines=True)
|
||||
output = []
|
||||
|
@ -200,7 +203,7 @@ def run_install_with_spinner(cmd):
|
|||
|
||||
for line in process.stdout:
|
||||
output.append(line)
|
||||
print(f"\rInstalling... {next(spinner)}", end="", flush=True)
|
||||
print(f" Installing... {next(spinner)}", end="\r", flush=True)
|
||||
|
||||
return_code = process.wait()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue