# File lib/rubygems/command.rb, line 270
  def invoke(*args)
    handle_options args

    if options[:help] then
      show_help
    elsif @when_invoked then
      @when_invoked.call options
    else
      execute
    end
  end