Skip to content

Add support for always overwriting existing paths#169

Merged
tonistiigi merged 1 commit intotonistiigi:masterfrom
sipsma:allow-replace
Nov 22, 2023
Merged

Add support for always overwriting existing paths#169
tonistiigi merged 1 commit intotonistiigi:masterfrom
sipsma:allow-replace

Conversation

@sipsma
Copy link
Copy Markdown
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 <erik@sipsma.dev>
@sipsma
Copy link
Copy Markdown
Contributor Author

sipsma commented Nov 22, 2023

ping @tonistiigi

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