jwaldrip / admiral.cr

A robust DSL for writing command line interfaces written in Crystal.
https://jwaldrip.github.com/admiral.cr
MIT License
135 stars 14 forks source link

Can't call --help when there is any required flags #1

Closed relonger closed 7 years ago

relonger commented 7 years ago

define_help description: "Generate SQL files to load content data to DB" define_flag account_id : Int32, required: true, description: "Account ID to process"

Calling with --help gives:

Flag: --account-id is required (Admiral::Error)
0x10fdec935: *CallStack::unwind:Array(Pointer(Void)) at ??
0x10fdec8d1: *CallStack#initialize:Array(Pointer(Void)) at ??
0x10fdec8a8: *CallStack::new:CallStack at ??
0x10fde93d1: *raise<Admiral::Error>:NoReturn at ??

Setting required: false solves the issue, but requires extra manual check on command run.

jwaldrip commented 7 years ago

@relonger sorry for the long wait here. I'm on it.