lib/berkshelf/locations/git.rb in berkshelf-4.3.5 vs lib/berkshelf/locations/git.rb in berkshelf-5.0.0

- old
+ new

@@ -64,12 +64,12 @@ end # Validate the scratched path is a valid cookbook validate_cached!(scratch_path) - # If we got this far, we should copy + # If we got this far, we should atomically move FileUtils.rm_rf(install_path) if install_path.exist? - FileUtils.cp_r(scratch_path, install_path) + FileUtils.mv(scratch_path, install_path) # Remove the git history FileUtils.rm_rf(File.join(install_path, '.git')) install_path.chmod(0777 & ~File.umask)