mirror of
https://github.com/munki/munki.git
synced 2026-03-01 04:19:50 -06:00
Fixed manifestutil traceback if no subcommands are given
In manifestutil if no subcommands are given manifestutil exits with a trackback. I added a check to see if the number of subcommands is < 1 and to list the available subcommands if so.
This commit is contained in:
@@ -882,6 +882,12 @@ def setUpTabCompleter():
|
||||
|
||||
def handleSubcommand(args):
|
||||
'''Does all our subcommands'''
|
||||
# check if any arguments are passed.
|
||||
# if not, list subcommands.
|
||||
if len(args) < 1:
|
||||
help(args)
|
||||
return 2
|
||||
|
||||
# strip leading hyphens and
|
||||
# replace embedded hyphens with underscores
|
||||
# so '--add-pkg' becomes 'add_pkg'
|
||||
|
||||
Reference in New Issue
Block a user