Use PhutilArgumentParser in Daemon overseer/executor
Summary:
- Add a 'repeatable' flag for argument specifications.
- Add some code to detect and throw on invalid specs (e.g., parameter +
wildcard).
- Fix a bug where 'help' would show param name twice even for arguments with
no short flag.
- Rename 'printHelp()' to 'renderHelp()'.
- Add 'printHelpAndExit()'.
- Convert launch_daemon.php to use PhutilArgumentParser.
- Convert exec_daemon.php to use PhutilArgumentParser.
Test Plan:
- Ran unit tests.
- Ran daemons directly (launch_daemon.php, exec_daemon.php) and via "phd" (phd
debug, phd launch, phd status, phd stop).
- Ran utf8.php.
Reviewers: davidreuss, btrahan
Reviewed By: btrahan
CC: aran, epriestley
Differential Revision: https://secure.phabricator.com/D1537