Remove default value for refresh option, fixes #22

The default value was making the refresh option have a value even if
the input option was omitted from the command. I believe this is a bug
in Symfony Command. I’ve removed the default value, and now the `-r`
option requires a value.
This commit is contained in:
Craig Davis 2014-04-13 12:56:33 -05:00
parent 91e97e2354
commit 746db2a89e
2 changed files with 4 additions and 6 deletions

View File

@ -33,17 +33,15 @@ class HtmlCommand extends Command
->addOption(
'template',
't',
InputOption::VALUE_OPTIONAL,
InputOption::VALUE_REQUIRED,
'Which of the templates to use'
)
->addOption(
'refresh',
'r',
InputOption::VALUE_OPTIONAL,
InputOption::VALUE_REQUIRED,
'Regenerate the html and include a meta command to refresh the ' .
'document every periodically. Measured in seconds. Defaults to' .
'5 seconds',
5
'document every periodically. Measured in seconds.'
);
}

View File

@ -27,7 +27,7 @@ class PdfCommand extends HtmlCommand
->addOption(
'template',
't',
InputOption::VALUE_OPTIONAL,
InputOption::VALUE_REQUIRED,
'Which of the templates to use'
);
}