Updated for tmp clean

This commit is contained in:
Dimitris Zlatanidis 2023-03-13 20:40:35 +02:00
parent 7c47dcaa18
commit a5292d9bf7

View file

@ -27,6 +27,7 @@ from slpkg.views.view_package import ViewPackage
from slpkg.remove_packages import RemovePackages
from slpkg.clean_logs import CleanLogsDependencies
from slpkg.update_repository import UpdateRepository
from slpkg.views.views import ViewMessage
class Argparse(Configs):
@ -464,8 +465,15 @@ class Argparse(Configs):
def clean_tmp(self) -> None:
if len(self.args) == 1:
print(f"\n[{self.bred}WARNING{self.endc}]: All the files in the '{self.tmp_path}{self.prog_name}' "
f"folder will delete!")
views = ViewMessage(self.flags)
views.question()
self.utils.remove_folder_if_exists(path=self.tmp_path, folder=self.prog_name)
self.utils.create_folder(path=self.tmp_slpkg, folder='build')
print(f"The folder '{self.tmp_path}{self.prog_name}' was cleaned!")
raise SystemExit()
self.usage.help(1)