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

- old
+ new

@@ -40,10 +40,11 @@ lock_deps = [] cached_cookbooks = resolver.resolve.collect do |name, version, dependency| lock_deps << dependency + 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) @@ -113,12 +114,22 @@ # still satisfies the version constraint. If it does, "lock" that dependency # because we should just use the locked version. # # If a locked dependency exists, but doesn't satisfy the constraint, raise a # {Berkshelf::OutdatedDependency} and tell the user to run update. + # + # Never use the locked constraint for a dependency with a {PathLocation} + # + # @param [Array<Berkshelf::Dependency>] dependencies + # + # @return [Array<Berkshelf::Dependency>] def lockfile_reduce(dependencies = []) dependencies.collect do |dependency| - dependency_from_lockfile(dependency) || dependency + if dependency.path_location? + dependency + else + dependency_from_lockfile(dependency) || dependency + end end end # The list of dependencies "locked" by the lockfile. #