diff --git a/moulinette/interfaces/cli.py b/moulinette/interfaces/cli.py index 744afdc5..54216894 100644 --- a/moulinette/interfaces/cli.py +++ b/moulinette/interfaces/cli.py @@ -412,6 +412,9 @@ class ActionsMapParser(BaseActionsMapParser): else: _p = _p._actions[1] + if tid == []: + return None + raise MoulinetteError(f"Authentication undefined for {tid} ?", raw_msg=True) def parse_args(self, args, **kwargs): @@ -497,6 +500,9 @@ class Interface: if output_as and output_as not in ["json", "plain", "none"]: raise MoulinetteValidationError("invalid_usage") + if not args: + raise MoulinetteValidationError("invalid_usage") + try: ret = self.actionsmap.process(args, timeout=timeout) except (KeyboardInterrupt, EOFError):