Skip to content
  • Mike McQuaid's avatar
    Refactor CLI to remove `unless args_parsed` · 20a11993
    Mike McQuaid authored
    Refactor the CLI::Args module so it doesn't have different paths to
    check arguments depending on whether the arguments have been parsed or
    not. Instead, set the values we need from the global ARGV at
    first, global initialisation time where they will be thrown away when
    the actual arguments are parsed.
    
    To do this some other general refactoring was needed:
    - more methods made private when possible
    - e.g. `HEAD?` used consistently instead of `head` before arguments
      are parsed.
    - formula options are only parsed after named arguments are extracted
    20a11993