Do not fail in case we cannot remove cached images

Add a TODO, we should have a cli flag to treat warnings as fatal
This commit is contained in:
Ettore Di Giacinto
2019-11-12 22:17:51 +01:00
parent f8f319941a
commit 747d0ef9ac

View File

@@ -164,7 +164,9 @@ func (cs *LuetCompiler) compileWithImage(image, buildertaggedImage, packageImage
// TODO: Handle caching and optionally do not remove things
err = cs.Backend.RemoveImage(builderOpts)
if err != nil {
return nil, errors.Wrap(err, "Could not remove image")
// TODO: Have a --fatal flag which enables Warnings to exit.
Warning("Could not remove image ", builderOpts.ImageName)
// return nil, errors.Wrap(err, "Could not remove image")
}
}
rootfs, err := ioutil.TempDir(p.GetOutputPath(), "rootfs")