lib/bolt/bolt_option_parser.rb in bolt-2.36.0 vs lib/bolt/bolt_option_parser.rb in bolt-2.37.0

- old
+ new

@@ -12,11 +12,11 @@ escalation: %w[run-as sudo-password sudo-password-prompt sudo-executable], run_context: %w[concurrency inventoryfile save-rerun cleanup], global_config_setters: PROJECT_PATHS + %w[modulepath], transports: %w[transport connect-timeout tty native-ssh ssh-command copy-command], display: %w[format color verbose trace], - global: %w[help version debug log-level] }.freeze + global: %w[help version debug log-level clear-cache] }.freeze ACTION_OPTS = OPTIONS.values.flatten.freeze def get_help_text(subcommand, action = nil) case subcommand @@ -967,12 +967,12 @@ 'in Bolt project configuration') do |resolve| @options[:resolve] = resolve end separator "\nPLAN OPTIONS" - define('--pp', 'Create a new Puppet language plan.') do |pp| - @options[:puppet] = pp + define('--pp', 'Create a new Puppet language plan.') do |_| + @options[:puppet] = true end separator "\nDISPLAY OPTIONS" define('--filter FILTER', 'Filter tasks and plans by a matching substring') do |filter| unless /^[a-z0-9_:]+$/.match(filter) @@ -1022,9 +1022,13 @@ end define('--log-level LEVEL', "Set the log level for the console. Available options are", "trace, debug, info, warn, error, fatal, any.") do |level| @options[:log] = { 'console' => { 'level' => level } } + end + define('--clear-cache', + "Clear plugin cache before executing") do |_| + @options[:clear_cache] = true end define('--plugin PLUGIN', 'Select the plugin to use') do |plug| @options[:plugin] = plug end end