feat: printing utils
This commit is contained in:
+17
-2
@@ -1,6 +1,7 @@
|
||||
import subprocess
|
||||
|
||||
from commands.util import pacman
|
||||
from commands.util.input_mgr import confirm
|
||||
|
||||
|
||||
def setup():
|
||||
@@ -8,6 +9,20 @@ def setup():
|
||||
if not pacman.install_package_list(["git"]):
|
||||
print("Git installation failed")
|
||||
return
|
||||
subprocess.run(["git", "clone", "https://aur.archlinux.org/yay.git"], cwd="/tmp")
|
||||
subprocess.run(["makepkg", "-si"], cwd="/tmp/yay")
|
||||
|
||||
subprocess.run(
|
||||
["git", "clone", "https://aur.archlinux.org/yay.git"],
|
||||
cwd="/tmp",
|
||||
capture_output=True,
|
||||
)
|
||||
yay_install = subprocess.run(
|
||||
["makepkg", "-si"], cwd="/tmp/yay", capture_output=True
|
||||
)
|
||||
|
||||
if yay_install.returncode != 0:
|
||||
print("==> Installation of yay failed")
|
||||
if confirm(True, "Do you wish to view the logs?"):
|
||||
print(yay_install.stdout, "\n", yay_install.stderr)
|
||||
return
|
||||
|
||||
print("==> Installation completed")
|
||||
|
||||
Reference in New Issue
Block a user