diff --git a/src/cmd/linuxkit/pkg_build.go b/src/cmd/linuxkit/pkg_build.go index d6fda1029..141774f9a 100644 --- a/src/cmd/linuxkit/pkg_build.go +++ b/src/cmd/linuxkit/pkg_build.go @@ -158,6 +158,14 @@ func pkgBuildPush(args []string, withPush bool) { pkgPlats = append(pkgPlats, imagespec.Platform{OS: "linux", Architecture: a}) } } + + // if there are no platforms to build for, do nothing. + // note that this is *not* an error; we simply skip it + if len(pkgPlats) == 0 { + fmt.Printf("Skipping %s with no architectures to build\n", p.Tag()) + return + } + pkgOpts = append(pkgOpts, pkglib.WithBuildPlatforms(pkgPlats...)) var msg, action string