lib/berkshelf/installer.rb in berkshelf-3.0.0.beta3 vs lib/berkshelf/installer.rb in berkshelf-3.0.0.beta4

- old
+ new

@@ -45,10 +45,12 @@ dependency.locked_version ||= Solve::Version.new(version) if dependency.downloaded? Berkshelf.formatter.use(dependency.name, dependency.cached_cookbook.version, dependency.location) dependency.cached_cookbook else - Berkshelf.formatter.install(name, version, dependency) + source = berksfile.sources.find { |source| source.cookbook(name, version) } + remote_cookbook = source.cookbook(name, version) + Berkshelf.formatter.install(name, version, api_source: source.to_s, location_path: remote_cookbook.location_path) temp_filepath = downloader.download(name, version) CookbookStore.import(name, version, temp_filepath) end end