Recently started using argparse. Works great so far, but I have a small issue: I have an option defined as this:
let p = newParser:
command("run"):
option("--token", help="App token", env="APP_TOKEN", required=true)
run:
discard
try:
p.run()
except UsageError as e:
stderr.writeLine getCurrentExceptionMsg()
quit(1)
If I set APP_TOKEN to some non-empty value, I expect my program to run. But instead I'm getting an error: "Option --fbx-token is required and was not provided".
Yes, I think logically it makes sense to change it to behave like you've described. I'm not sure when I'll get around to it, but I'll take a look when I can.
Hey there,
Recently started using
argparse
. Works great so far, but I have a small issue: I have an option defined as this:If I set
APP_TOKEN
to some non-empty value, I expect my program to run. But instead I'm getting an error: "Option --fbx-token is required and was not provided".Would it be possible to fix that?
Thanks a lot! 🙂