Updated for configs

This commit is contained in:
Dimitris Zlatanidis 2022-12-28 12:32:39 +02:00
parent 417dee263b
commit 207598dd4c
2 changed files with 4 additions and 2 deletions

View file

@ -51,7 +51,8 @@ class Argparse:
self.flag_full_reverse = '--full-reverse'
self.flag_search = '--search'
if not self.configs.dialog and self.flag_search in self.args:
if (not self.configs.dialog and self.flag_search in self.args or
not self.configs.dialog and 'configs' in self.args):
print("Error: You should enable the dialog "
"in the '/etc/slpkg/' folder.\n")
self.usage.help(1)

View file

@ -65,7 +65,8 @@ class Usage:
f' {self.yellow}--search{self.endc} Search packages from the repository.\n'
'\n -h, --help Show this message and exit.\n'
' -v, --version Print version and exit.\n'
'\nEdit the configuration file in the /etc/slpkg/slpkg.toml.\n'
'\nEdit the configuration file in the /etc/slpkg/slpkg.toml \n'
"or run 'slpkg configs'.\n"
'If you need more information try to use slpkg manpage.')
print(args)