mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-11-12 19:27:18 +00:00
Ask before upgrading
This commit is contained in:
parent
f482a49a98
commit
06a94d87fd
|
@ -3,7 +3,7 @@ import yaml
|
||||||
|
|
||||||
from src.util.package import Package, PackageAlreadyInstalled, InvalidPackage
|
from src.util.package import Package, PackageAlreadyInstalled, InvalidPackage
|
||||||
from src.util.install import Install
|
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]:
|
def obtain_packages() -> t.List[Package]:
|
||||||
|
@ -27,7 +27,8 @@ def obtain_packages() -> t.List[Package]:
|
||||||
|
|
||||||
def install_packages() -> None:
|
def install_packages() -> None:
|
||||||
packages = obtain_packages()
|
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:
|
for package in packages:
|
||||||
try:
|
try:
|
||||||
Print.action(f"Installing {package}")
|
Print.action(f"Installing {package}")
|
||||||
|
|
Loading…
Reference in a new issue