class Bundler::Thor::Options

def peek

def peek
  return super unless @parsing_options
  result = super
  if result == OPTS_END
    shift
    @parsing_options = false
    @stopped_parsing_after_extra_index ||= @extra.size
    super
  else
    result
  end
end