From 06a94d87fdf2d544068fe53adaf8aeea0dcc8b00 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Thu, 22 Oct 2020 20:06:48 +0200 Subject: [PATCH] Ask before upgrading --- src/packages.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/packages.py b/src/packages.py index a633fef..09ab9fe 100644 --- a/src/packages.py +++ b/src/packages.py @@ -3,7 +3,7 @@ import yaml from src.util.package import Package, PackageAlreadyInstalled, InvalidPackage from src.util.install import Install -from src.util.user import Print +from src.util.user import Print, Input def obtain_packages() -> t.List[Package]: @@ -27,7 +27,8 @@ def obtain_packages() -> t.List[Package]: def install_packages() -> None: packages = obtain_packages() - Install.upgrade_pacman() + if Input.yes_no("Do you wish to perform system upgrade first? (Recommended)"): + Install.upgrade_pacman() for package in packages: try: Print.action(f"Installing {package}")