summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-01-03 16:42:46 +0000
committerdavidovski <david@davidovski.xyz>2022-01-03 16:42:46 +0000
commit22e6ff62931ff4388ab4bfc4abb52d9785c68e3b (patch)
treedbe6292038c8cf99db0ec00a4dbcaf4d9ce68ae5 /src
parentb0ba2cf91f3a75ca32304201131571ad87c5cc90 (diff)
added error checking for install
Diffstat (limited to 'src')
-rw-r--r--src/verbs/install.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/verbs/install.py b/src/verbs/install.py
index 3ddd88c..60e1809 100644
--- a/src/verbs/install.py
+++ b/src/verbs/install.py
@@ -321,8 +321,13 @@ def install(args, options, config):
if util.ask_confirmation(colors.BLUE + "Continue?", no_confirm=options["y"]):
for package in to_install:
- install_single(package, options, config, verbose=v, unsafe=unsafe)
- util.fill_line(f"Installed {package}", colors.BG_CYAN + colors.LIGHT_BLACK, end="\n")
+ try:
+ install_single(package, options, config, verbose=v, unsafe=unsafe)
+ util.fill_line(f"Installed {package}", colors.BG_CYAN + colors.LIGHT_BLACK, end="\n")
+ except Exception as e:
+ util.fill_line(f"Failed to install {package}", colors.BG_RED + colors.LIGHT_BLACK, end="\n")
+ util.fill_line(str(e), colors.CLEAR_LINE + colors.RESET + colors.RED, end="\n")
+
else:
print(colors.RED + "Action cancelled by user")