Skip to content

Commit

Permalink
fix: fix mk help on Python 3.10+
Browse files Browse the repository at this point in the history
  • Loading branch information
un-def committed Apr 15, 2024
1 parent d0539cf commit a19ea41
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/luamb/_luamb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a19ea41

Please sign in to comment.