From 8646002349ba75cf706e3779774b31c8b37be2f8 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:39:04 +0200 Subject: [PATCH] build: retain local and tar exporter attributes Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- util/buildflags/export.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util/buildflags/export.go b/util/buildflags/export.go index fb66d2a6efb9..f155174bf6ff 100644 --- a/util/buildflags/export.go +++ b/util/buildflags/export.go @@ -32,6 +32,7 @@ func ParseExports(inp []string) ([]*controllerapi.ExportEntry, error) { if s != "-" { outs = append(outs, &controllerapi.ExportEntry{ Type: client.ExporterLocal, + Attrs: map[string]string{"dest": s}, Destination: s, }) continue @@ -71,7 +72,8 @@ func ParseExports(inp []string) ([]*controllerapi.ExportEntry, error) { if dest, ok := out.Attrs["dest"]; ok { out.Destination = dest - delete(out.Attrs, "dest") + } else if !ok && out.Destination != "" { + out.Attrs["dest"] = out.Destination } outs = append(outs, &out)