Fixed for disabled repositories

This commit is contained in:
Dimitris Zlatanidis 2023-04-12 23:47:09 +03:00
parent 8d6314aa99
commit 64b00c9b8b

View file

@ -306,7 +306,10 @@ class Argparse(Configs):
'-c', 'check-updates',
]
if self.binary_repo == '*' and not self.utils.is_option(except_options, self.args):
if self.binary_repo in self.repos.bin_repos_names and self.binary_repo not in self.repos.bin_enabled_repos:
self.usage.help_minimal(f"{self.prog_name}: repository '{self.binary_repo}' is disabled")
elif self.binary_repo == '*' and not self.utils.is_option(except_options, self.args):
self.usage.help_minimal(f"{self.prog_name}: invalid binary repository '{self.binary_repo}'")
elif self.binary_repo not in self.repos.bin_repos_names and self.binary_repo != '*':