Ask user before running makepkg on git repo

This commit is contained in:
ItsDrike 2020-10-22 21:59:29 +02:00
parent 1cd0451ddf
commit 2cacd9c142
No known key found for this signature in database
GPG key ID: F4E8FF4F6AC7F3B4

View file

@ -2,7 +2,7 @@ import shutil
import os
from src.util import command
from src.util.user import Print
from src.util.user import Print, Input
class Install:
@ -38,12 +38,11 @@ class Install:
Print.comment(f"Git repository {dir_name} doesn't contain PKGBUILD, only downloaded.")
return
if Input.yes_no("Do you wish to run makepkg on the downloaded git repository?"):
cwd = os.getcwd()
print(cwd)
os.chdir(dir_name)
command.execute("makepkg -si")
os.chdir(cwd)
shutil.rmtree(dir_name)
else:
command.execute(f"mv {dir_name} home/")