-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(PUP-11693) Global OptionParser ignores partially matched invalid params
This commit modifies how partial matches are handled when parsing global command line options. Before, Puppet would accept and do nothing with options global options that use '-' instead of '_'. For example, it would accept '--show-diff' and do nothing when the correct name is '--show_diff'. With this change, while handling any global options given in the command line options, if the command line option does not match existing global options, it will convert '-' to '_' and vice versa. Then, check if that matches a valid global option. Additionally, if the command line option needs to convert '-' to '_' or vice versa, Puppet will also warn to let the user know a partial match was detected and that this behavior will be deprecated in Puppet 9.
- Loading branch information
Showing
2 changed files
with
84 additions
and
2 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
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