Fixed for none packages

This commit is contained in:
Dimitris Zlatanidis 2023-03-14 13:18:25 +02:00
parent 1e3e9aa57d
commit e7c33a8f5e

View file

@ -25,6 +25,10 @@ class Check(Configs, Utilities):
self.endc: str = self.color['endc']
self.bred: str = f'{self.bold}{self.red}'
self.repo_path = self.sbo_repo_path
if self.ponce_repo:
self.repo_path = self.ponce_repo_path
def exists(self, slackbuilds: list) -> list:
""" Checking if the slackbuild exists in the repository. """
not_packages: list = []
@ -37,6 +41,11 @@ class Check(Configs, Utilities):
elif not SBoQueries(sbo).slackbuild():
not_packages.append(sbo)
else:
location = SBoQueries(sbo).location()
if not Path(self.repo_path, location, sbo).is_dir():
not_packages.append(sbo)
if not_packages:
raise SystemExit(f"\n[{self.bred}Error{self.endc}]: Packages "
f"'{self.cyan}{', '.join(not_packages)}{self.endc}' does not exists.\n")