class Berkshelf::Installer

def run

Returns:
  • (Array) -
def run
  lockfile.reduce!
  Berkshelf.formatter.msg("Resolving cookbook dependencies...")
  dependencies, cookbooks =
    if lockfile.trusted?
      install_from_lockfile
    else
      install_from_universe
    end
  Berkshelf.log.debug "  Finished resolving, calculating locks"
  to_lock = dependencies.select do |dependency|
    berksfile.has_dependency?(dependency)
  end
  Berkshelf.log.debug "  New locks"
  to_lock.each do |lock|
    Berkshelf.log.debug "    #{lock}"
  end
  lockfile.graph.update(cookbooks)
  lockfile.update(to_lock)
  lockfile.save
  cookbooks
end