From fb43a2cb5610d4e4d94a5a91a9cd415296a26841 Mon Sep 17 00:00:00 2001 From: "flyingscorpio@pinebookpro" Date: Wed, 30 Jun 2021 11:08:40 +0200 Subject: [PATCH] For Arch in do_install, update first, then install --- install.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/install.py b/install.py index 74c296a..65de56b 100755 --- a/install.py +++ b/install.py @@ -211,9 +211,19 @@ class Installer: this_stderr: Optional[int] = subprocess.DEVNULL if self.hide_commands else None ui.info_2("Installing packages...") + + if self.operating_system == "arch": + subprocess.run( + "sudo pacman -Syu", + check=True, + shell=True, + stdout=this_stdout, + stderr=this_stderr, + ) + for i, package in enumerate(packages): if self.operating_system == "arch": - command = "sudo pacman -Syu --needed --noconfirm {}".format(package) + command = "sudo pacman -S --needed --noconfirm {}".format(package) elif self.operating_system == "debian": command = "sudo apt install -y {}".format(package)