forked from LaconicNetwork/kompose
Fix printing docker build output if -v is given (#1255)
The current version only prints the docker build output if the build was successful.
This commit is contained in:
parent
2bdb3261a0
commit
671035e1f8
@ -71,12 +71,14 @@ func (c *Build) BuildImage(source string, image string, dockerfile string) error
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Build it!
|
// Build it!
|
||||||
if err := c.Client.BuildImage(opts); err != nil {
|
err = c.Client.BuildImage(opts)
|
||||||
|
log.Debugf("Image %s build output:\n%s", image, outputBuffer)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
return errors.Wrap(err, "Unable to build image. For more output, use -v or --verbose when converting.")
|
return errors.Wrap(err, "Unable to build image. For more output, use -v or --verbose when converting.")
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Infof("Image '%s' from directory '%s' built successfully", image, path.Base(source))
|
log.Infof("Image '%s' from directory '%s' built successfully", image, path.Base(source))
|
||||||
log.Debugf("Image %s build output:\n%s", image, outputBuffer)
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user