-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config: Explicitly handle help requests.
Checking for --help as an explicit step before parsing any other configs makes the code more intuitive by removing a convoluted bit of error handling. It also enables the IgnoreUnknown option to be used whilst parsing for help, which ensures the presence of --help will always result in the help message being printed. This fixes a minor inconsistency where the help message would be printed if the flag was placed before an invalid config, but placing it after would cause an invalid config error to be written instead. For example, `dcrd --help --fakeflag` vs `dcrd --fakeflag --help`.
- Loading branch information
1 parent
1897e8c
commit a645aca
Showing
1 changed file
with
18 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters