From ad860a6dd443b10655c8cd758bf66d128159cec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Thu, 16 Feb 2023 14:58:20 +0100 Subject: [PATCH] osbuild/copy: add support for `remove_destination` option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add support for newly added `remove_destination` option in the copy stage. Related to https://github.com/osbuild/osbuild/pull/1241 Signed-off-by: Tomáš Hozza --- internal/osbuild/copy_stage.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/osbuild/copy_stage.go b/internal/osbuild/copy_stage.go index 3d3f06f69..73388240a 100644 --- a/internal/osbuild/copy_stage.go +++ b/internal/osbuild/copy_stage.go @@ -17,6 +17,10 @@ type CopyStageOptions struct { type CopyStagePath struct { From string `json:"from"` To string `json:"to"` + + // Remove the destination before copying. Works only for files, not directories. + // Default: false + RemoveDestination bool `json:"remove_destination,omitempty"` } func (CopyStageOptions) isStageOptions() {}