Signed-off-by: John Howard <jhoward@microsoft.com>
| ... | ... |
@@ -158,6 +158,9 @@ func (l *tarexporter) takeLayerReference(id image.ID, imgDescr *imageDescriptor) |
| 158 | 158 |
if os == "" {
|
| 159 | 159 |
os = runtime.GOOS |
| 160 | 160 |
} |
| 161 |
+ if !system.IsOSSupported(os) {
|
|
| 162 |
+ return fmt.Errorf("os %q is not supported", os)
|
|
| 163 |
+ } |
|
| 161 | 164 |
layer, err := l.lss[os].Get(topLayerID) |
| 162 | 165 |
if err != nil {
|
| 163 | 166 |
return err |