diff options
author | davidovski <david@davidovski.xyz> | 2022-01-03 16:42:46 +0000 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-01-03 16:42:46 +0000 |
commit | 22e6ff62931ff4388ab4bfc4abb52d9785c68e3b (patch) | |
tree | dbe6292038c8cf99db0ec00a4dbcaf4d9ce68ae5 | |
parent | b0ba2cf91f3a75ca32304201131571ad87c5cc90 (diff) |
added error checking for install
-rwxr-xr-x | install-system.sh | 12 | ||||
-rw-r--r-- | src/verbs/install.py | 9 |
2 files changed, 13 insertions, 8 deletions
diff --git a/install-system.sh b/install-system.sh index 33766e1..62036b4 100755 --- a/install-system.sh +++ b/install-system.sh @@ -18,13 +18,13 @@ mkdir -p $R/usr/lib mkdir -p $R/root cd $R -ln -s usr/bin bin -ln -s usr/bin sbin -ln -s usr/bin usr/sbin +ln -s /bin usr/bin +ln -s /bin sbin +ln -s /bin usr/sbin -ln -s usr/lib lib -ln -s usr/lib lib64 -ln -s usr/lib usr/lib64 +ln -s /lib lib +ln -s /lib lib64 +ln -s /lib usr/lib64 ln -s usr/local usr 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") |