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

Add support for always overwriting existing paths #169

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

sipsma
Copy link
Contributor

@sipsma sipsma commented Nov 6, 2023

Before this, copy would always refuse to replace an existing path in the dest with something from the source of a different type. E.g. if there was a symlink at the dest, you'd get an error if copying src meant replacing the symlink w/ a directory.

This is the right default behavior but there are situations in which callers may want to opt in to instead always replacing what's in dest with what's in source.

This adds an option to enable that behavior.


cc @tonistiigi @jedevc PTAL, if we're good with adding this option I'll follow up with adding this option to LLB's CopyInfo too.

Before this, copy would always refuse to replace an existing path in the
dest with something from the source of a different type. E.g. if there
was a symlink at the dest, you'd get an error if copying src meant
replacing the symlink w/ a directory.

This is the right default behavior but there are situations in which
callers may want to opt in to instead always replacing what's in dest
with what's in source.

This adds an option to enable that behavior.

Signed-off-by: Erik Sipsma <[email protected]>
@sipsma
Copy link
Contributor Author

sipsma commented Nov 22, 2023

ping @tonistiigi

@tonistiigi tonistiigi merged commit 797bd68 into tonistiigi:master Nov 22, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants