macadmins / installapplications

A tool for dynamically using installapplication
Apache License 2.0
285 stars 62 forks source link

generatejson.py number of parser arguments incorrect? #101

Closed fortiko closed 2 years ago

fortiko commented 2 years ago

Hello! Sorry if I missed something, but on line 237 of generatejson.py it says

parser.add_argument('--item', default=None, action='append', nargs=6,

but then the code proceeds to require 7 arguments:

item-name='A name' item-path='A path' item-stage='A stage' item-type='A type' item-url='A url' script-do-not-wait='A boolean' pkg-skip-if='A string'

which for me leads to ValueError("length of metavar tuple does not match nargs").

If I updated nargs=7, the code works as expected and generates bootstrap.json in the output directory.

Should that be fixed or am I missing something here?

erikng commented 2 years ago

It could be a bug. I've merged some PRs lately that I personally haven't tested and trusted the author. If you have fixed it, please PR it and I'll merge.

andrewzirkel commented 2 years ago

I have it fixed in 100 so you can reference that or merge that piece.

erikng commented 2 years ago

I fixed it. Thanks for the note.