mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Add help screen
This commit is contained in:
parent
695d8f0e9d
commit
750e206178
@ -2608,6 +2608,9 @@ class SPMParser(six.with_metaclass(OptionParserMeta,
|
||||
'''
|
||||
The cli parser object used to fire up the salt spm system.
|
||||
'''
|
||||
description = 'SPM is used to manage 3rd party formulas and other Salt components'
|
||||
|
||||
usage = '%prog [options] <function> [arguments]'
|
||||
|
||||
# ConfigDirMixIn config filename attribute
|
||||
_config_filename_ = 'spm'
|
||||
@ -2628,5 +2631,11 @@ class SPMParser(six.with_metaclass(OptionParserMeta,
|
||||
help='Default yes in answer to all confirmation questions.'
|
||||
)
|
||||
|
||||
def _mixin_after_parsed(self):
|
||||
# spm needs arguments
|
||||
if len(self.args) <= 1:
|
||||
self.print_help()
|
||||
self.exit(salt.defaults.exitcodes.EX_USAGE)
|
||||
|
||||
def setup_config(self):
|
||||
return salt.config.spm_config(self.get_config_file_path())
|
||||
|
Loading…
Reference in New Issue
Block a user