Skip to content

Commit 5378380

Browse files
committed
chore(publish): log os/arch by reading config file
if the goos and goarch don't match any manifest, the log output is wrong Signed-off-by: Lukas Hoehl <[email protected]>
1 parent e34a2b5 commit 5378380

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/build/oci/publish.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,11 @@ func LoadIndex(ctx context.Context, idx v1.ImageIndex, tags []string) (name.Refe
142142
return name.Digest{}, fmt.Errorf("reading child image %q", useManifest.Digest.String())
143143
}
144144

145-
log.Infof("using best guess single-arch image for local tags (%s/%s)", goos, goarch)
145+
cf, err := img.ConfigFile()
146+
if err != nil {
147+
return name.Digest{}, fmt.Errorf("getting config file: %w", err)
148+
}
149+
log.Infof("using best guess single-arch image for local tags (%s/%s)", cf.OS, cf.Architecture)
146150
return LoadImage(ctx, img, tags)
147151
}
148152

0 commit comments

Comments
 (0)