lib/berkshelf/locations/git_location.rb in berkshelf-2.0.3 vs lib/berkshelf/locations/git_location.rb in berkshelf-2.0.4

- old
+ new

@@ -52,11 +52,11 @@ # @param [#to_s] destination # # @return [Berkshelf::CachedCookbook] def download(destination) if cached?(destination) - @ref = Berkshelf::Git.rev_parse(revision_path(destination)) + @ref ||= Berkshelf::Git.rev_parse(revision_path(destination)) return local_revision(destination) end Berkshelf::Git.checkout(clone, ref || branch) if ref || branch @ref = Berkshelf::Git.rev_parse(clone) @@ -75,10 +75,9 @@ FileUtils.mv(tmp_path, cb_path) cached = CachedCookbook.from_store_path(cb_path) validate_cached(cached) - set_downloaded_status(true) cached end def to_hash super.tap do |h|