# File lib/mongrel/command.rb, line 182
      def run(args)
        # find the command
        cmd_name = args.shift

        if !cmd_name or cmd_name == "?" or cmd_name == "help"
          print_command_list
          return true
        elsif cmd_name == "--version"
          STDERR.puts "Mongrel Web Server #{Mongrel::Const::MONGREL_VERSION}"
          return true
        end

        # command exists, set it up and validate it
        begin
          command = GemPlugin::Manager.instance.create("/commands/#{cmd_name}", :argv => args)
        rescue
          STDERR.puts "INVALID COMMAND: #$!"
          print_command_list
          return false
        end

        # Normally the command is NOT valid right after being created
        # but sometimes (like with -h or -v) there's no further processing
        # needed so the command is already valid so we can skip it.
        if not command.done_validating
          if not command.validate
            STDERR.puts "#{cmd_name} reported an error. Use mongrel_rails #{cmd_name} -h to get help."
            return false
          else
            command.run
          end
        end

        return true
      end