Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fixes a bug that wasn't allowing help and version to be properly…
… overridden One should be able to override the auto generated help and version flags by simply providing an arg with a long of `help` or `version` respectively. This bug was preventing that from happening. However, now that it's fixed if one was relying on adding an arg with a long of `help` or `version` and using `get_matches_safe` to produce the `ErrorKind::HelpDisplayed` or `ErrorKind::VersionDisplayed` errors they **WILL NOT** happen anymore. This is because the bug was causing those "errors" to occur (i.e. the help or version message to be displayed). The "fix" to get that functionality back is to either: * Remove the arg with the long of `help` or `version` * Use `ArgMatches::is_present` instead of `App::get_matches_safe` to check for the presence of your custom help or version flag Option 1 is the easiest provided one wasn't using said arg to *also* override other aspects of the flags as well (short, help message, etc.) Even though this may break some code, as per the compatibility policy listed in the readme; code that breaks due to relying on a bug does *not* constitute a major version bump. I will however be bumping the minor version instead of just the patch version. I will also be searching for, contacting, and attempting to submit PRs to any affected projects prior to releasing the next version to crates.io Closes #922
- Loading branch information