Don't hide error on pulling image

This commit is contained in:
Ettore Di Giacinto
2020-11-28 18:03:43 +01:00
parent 87004c8e78
commit 9784d6192a
2 changed files with 6 additions and 2 deletions

View File

@@ -368,8 +368,12 @@ func (cs *LuetCompiler) buildPackageImage(image, buildertaggedImage, packageImag
buildAndPush := func(opts CompilerBackendOptions) error {
buildImage := true
if cs.Options.PullFirst {
if err := cs.Backend.DownloadImage(opts); err == nil {
err := cs.Backend.DownloadImage(opts)
if err == nil {
buildImage = false
} else {
Warning("Failed to download image. Will keep going and build the image unless you use --fatal")
Warning(err.Error())
}
}
if buildImage {