Skip to content

Commit abd8377

Browse files
committed
xpkg build command use base image labels if present
Signed-off-by: Evgheni Poleacov <[email protected]>
1 parent 395512a commit abd8377

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/xpkg/build.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@ func (b *Builder) Build(ctx context.Context, opts ...BuildOpt) (v1.Image, runtim
184184
}
185185

186186
cfg := cfgFile.Config
187-
cfg.Labels = make(map[string]string)
187+
if cfg.Labels == nil {
188+
cfg.Labels = make(map[string]string)
189+
}
188190

189191
pkgBytes, err := encode(pkg)
190192
if err != nil {

0 commit comments

Comments
 (0)