@api private
# File lib/puppet/util/command_line.rb, line 170 def run args = @command_line.args if args.include? "--version" or args.include? "-V" puts Puppet.version elsif @command_line.subcommand_name.nil? && args.count > 0 # If the subcommand is truly nil and there is an arg, it's an option; print out the invalid option message puts colorize(:hred, "Error: Could not parse application options: invalid option: #{args[0]}") exit 1 else puts "See 'puppet help' for help on available puppet subcommands" end end
# File lib/puppet/util/command_line.rb, line 166 def initialize(command_line) @command_line = command_line end