-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
fetch_git_dependency()
to clobber files in the destination if `…
…force_fetch=True` When force fetching Git dependencies, we need to be able to overwrite read-only files in the destination, since Git repos may contain read-only pack and index files in `.git/`. To do so, this commit introduces flag `clobber_files` for `utils.copy_tree()` which will completely clobber existing files in the destination by setting a custom `copy_function` for `shutil.copytree()` which deletes existing destination files before copying them with `shutil.copy2()`. With this change, `utils.copy_tree()` with `clobber_files=True` behaves pretty much identically to distutils' `copy_tree()` which was used in previous versions of Kapitan.
- Loading branch information
Showing
3 changed files
with
75 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters