From 6c2a1683278272e05f583c9b1cc1d6a40b3027d9 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 12 Jul 2024 17:46:39 +0100 Subject: [PATCH] Added a new function `run_install_with_spinner` to handle the pip installation process with a spinner. --- aider/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aider/utils.py b/aider/utils.py index 5a945e7fd..3b4bdfc72 100644 --- a/aider/utils.py +++ b/aider/utils.py @@ -190,6 +190,9 @@ def pip_install(args): ] cmd += args + run_install_with_spinner(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 = [] @@ -209,6 +212,7 @@ def pip_install(args): except subprocess.CalledProcessError as e: print(f"\nError running pip install: {e}") - print("\nInstallation failed. Full output:") + print("\nInstallation failed.\n") + for line in output: print(line)