mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 09:16:29 +00:00
Merge pull request #3859 from deitch/safety-check-platforms
catch error with descriptor missing platform
This commit is contained in:
commit
f8947c6ae6
@ -317,6 +317,9 @@ func (p Pkg) Build(bos ...BuildOpt) error {
|
||||
if desc == nil {
|
||||
return fmt.Errorf("no valid descriptor returned for image for arch %s", platform.Architecture)
|
||||
}
|
||||
if desc.Platform == nil {
|
||||
return fmt.Errorf("descriptor for platform %v has no information on the platform: %#v", platform, desc)
|
||||
}
|
||||
descs = append(descs, *desc)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user