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

No variable named long_reg #17

Closed redjohn closed 4 years ago

redjohn commented 5 years ago

I just tried to create a flag with a long version that didn't match the regex checked here, and the error message references a variable that isn't defined:

  define_flag skip_install : Bool,
  ^~~~~~~~~~~

in lib/admiral/src/admiral/command/flag.cr:285: undefined macro variable 'long_reg'

        raise "The long flag #{@type}(#{long}) must match the regex: #{long_reg}"
                                                                       ^~~~~~~~

I was still able to figure out what needed to be fixed in my code, but thought you would want to know.

jwaldrip commented 4 years ago

fixed