Avoid double help by felds · Pull Request #10 · nategood/commando

Conversation

@felds

This assures the parse method is called only once.

When the script is short-circuited on default help, it exists without mark the command as parsed, showing the helo message twice.

All tests passed.

@unstoppablecarl

I get the double help bug with the following code

$cmd = new Commando\Command();

$cmd->option('p')
    ->require()
    ->aka('package')
    ->describedAs('The name of the package dir');

$cmd->option('c')
    ->require()
    ->aka('class')
    ->describedAs('The full namespaced class name of the model, will be added to -namespace if set');

$cmd->option('ns')
    ->aka('namespace')
    ->describedAs('The namespace of the package module');

This pull request fixes that why hasn't this been merged?

@felds

@unstoppablecarl

It is so frustrating when this happens. This is a nice package but has a small bug.

@nategood

Sorry guys. Had a bit of a health scare recently that has set me behind on my inbox. I'll review and merge.

nategood added a commit that referenced this pull request

Jun 28, 2013

@felds

@nategood no worries, man! thank you!
btw, are you better?