forked from clan/clan-core
clan-cli: actually run commands
This commit is contained in:
parent
e9c0432681
commit
291b353d9c
@ -20,10 +20,14 @@ def main() -> None:
|
||||
admin.register_parser(parser_admin)
|
||||
if has_argcomplete:
|
||||
argcomplete.autocomplete(parser)
|
||||
parser.parse_args()
|
||||
|
||||
if len(sys.argv) == 1:
|
||||
parser.print_help()
|
||||
|
||||
args = parser.parse_args()
|
||||
if hasattr(args, "func"):
|
||||
args.func(args)
|
||||
|
||||
|
||||
if __name__ == "__main__": # pragma: no cover
|
||||
main()
|
||||
|
Loading…
Reference in New Issue
Block a user