Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fetch_git_dependency() to clobber files in the destination if force_fetch=True #1232

Merged

Commits on Sep 4, 2024

  1. 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.
    simu committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    69361f0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3f3e20c View commit details
    Browse the repository at this point in the history