LCOW: Check OS in takeLayerReference
Signed-off-by: John Howard <jhoward@microsoft.com> Upstream-commit: d8dbba14fd6a1be91e88082d4d4ba9aafd8c880a Component: engine
This commit is contained in:
@@ -158,6 +158,9 @@ func (l *tarexporter) takeLayerReference(id image.ID, imgDescr *imageDescriptor)
|
||||
if os == "" {
|
||||
os = runtime.GOOS
|
||||
}
|
||||
if !system.IsOSSupported(os) {
|
||||
return fmt.Errorf("os %q is not supported", os)
|
||||
}
|
||||
layer, err := l.lss[os].Get(topLayerID)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user