Minor things
This commit is contained in:
parent
8f62831b9d
commit
41d8cb42c9
5 changed files with 47 additions and 12 deletions
|
|
@ -93,7 +93,19 @@ func (s *Storage) BuildVMImageWithInterruptHandler(showBuilderVMDisplay bool, ov
|
|||
return errors.Wrap(err, "create new img build context")
|
||||
}
|
||||
|
||||
return errors.Wrap(buildCtx.BuildWithInterruptHandler(), "build")
|
||||
err = buildCtx.BuildWithInterruptHandler()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "do build")
|
||||
}
|
||||
|
||||
err = os.Remove(baseImagePath)
|
||||
if err != nil {
|
||||
s.logger.Error("Failed to remove base image", "error", err.Error(), "path", baseImagePath)
|
||||
} else {
|
||||
s.logger.Info("Removed base image", "path", baseImagePath)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *Storage) CheckVMImageExists() (string, error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue