Browse code

Fix validation of plugins without rootfs in config

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>

Tonis Tiigi authored on 2016/12/28 08:36:12
Showing 1 changed files
... ...
@@ -301,6 +301,10 @@ func configToRootFS(c []byte) (*image.RootFS, error) {
301 301
 	if err := json.Unmarshal(c, &pluginConfig); err != nil {
302 302
 		return nil, err
303 303
 	}
304
+	// validation for empty rootfs is in distribution code
305
+	if pluginConfig.Rootfs == nil {
306
+		return nil, nil
307
+	}
304 308
 
305 309
 	return rootFSFromPlugin(pluginConfig.Rootfs), nil
306 310
 }