fix: support exit_on_error

This commit is contained in:
egarette@silique.fr 2026-06-12 06:17:47 +02:00
parent fd8829bb24
commit a3c1fa27dc

View file

@ -327,6 +327,7 @@ class TiramisuCmdlineParser(ArgumentParser):
add_extra_options: bool = True,
short_name_max_len: int = 1,
add_help: bool = True,
exit_on_error: bool = True,
_forhelp: bool = False,
**kwargs,
):
@ -360,7 +361,7 @@ class TiramisuCmdlineParser(ArgumentParser):
else:
subconfig = subconfig.option(self.root)
self.namespace = TiramisuNamespace(self.config, self.root)
super().__init__(*args, add_help=add_help, **kwargs)
super().__init__(*args, add_help=add_help, exit_on_error=exit_on_error, **kwargs)
self.register("action", "help", _TiramisuHelpAction)
self._config_to_argparser(
_forhelp,