wycats / bundler

408 stars 30 forks source link

gem bundle *always* updates sources disregarding -u cmdline option #166

Open be9 opened 14 years ago

be9 commented 14 years ago

Here's code from lib/bundler/bundle.rb. Since valid == nil, options[:update] doesn't matter. But why Resolver.resolve(...) call is commented out?

# Check to see whether the existing cache meets all the requirements
  begin
    valid = nil
    # valid = Resolver.resolve(dependencies, [source_index], source_requirements)
  rescue Bundler::GemNotFound
  end

  sources = only_local(sources) if options[:cached]

  # Check the remote sources if the existing cache does not meet the requirements
  # or the user passed --update
  if options[:update] || !valid
    Bundler.logger.info "Calculating dependencies..."
    bundle = Resolver.resolve(dependencies, [@cache] + sources)
    download(bundle, options)
    do_install(bundle, options)
    valid = bundle
  end