diff --git a/src/luamb/_luamb.py b/src/luamb/_luamb.py index f2c7262..783bf93 100644 --- a/src/luamb/_luamb.py +++ b/src/luamb/_luamb.py @@ -252,9 +252,13 @@ def cmd_mk(self, argv): if args.help or (not args.env_name and not args.list_versions): output = self._call_hererocks(['--help'], capture_output=True) - hererocks_help = output.partition("optional arguments:\n")[2] + if sys.version_info >= (3, 10): + options_heading = "options:\n" + else: + options_heading = "optional arguments:\n" + hererocks_help = output.partition(options_heading)[2] parser.print_help() - print('\nhererocks arguments:') + print('\nhererocks options:') print(hererocks_help) return