lib/berkshelf/locations/git.rb in berkshelf-3.1.1 vs lib/berkshelf/locations/git.rb in berkshelf-3.1.2
- old
+ new
@@ -89,9 +89,13 @@
validate_cached!(scratch_path)
# If we got this far, we should copy
FileUtils.rm_rf(install_path) if install_path.exist?
FileUtils.cp_r(scratch_path, install_path)
+
+ # Remove the git history
+ FileUtils.rm_rf(File.join(install_path, '.git'))
+
install_path.chmod(0777 & ~File.umask)
ensure
# Ensure the scratch directory is cleaned up
FileUtils.rm_rf(scratch_path)
end