Many minor fixes/improvements
This commit is contained in:
parent
443dbf684c
commit
a47b4fc0ec
9 changed files with 53 additions and 39 deletions
|
|
@ -88,7 +88,7 @@ func (bc *BuildContext) BuildWithInterruptHandler() error {
|
|||
defer func() {
|
||||
err := bc.vi.Cancel()
|
||||
if err != nil {
|
||||
bc.logger.Error("Failed to cancel VM context", "error", err)
|
||||
bc.logger.Error("Failed to cancel VM context", "error", err.Error())
|
||||
}
|
||||
}()
|
||||
|
||||
|
|
@ -129,7 +129,7 @@ func (bc *BuildContext) BuildWithInterruptHandler() error {
|
|||
|
||||
err := bc.vi.Cancel()
|
||||
if err != nil {
|
||||
lg.Warn("Failed to cancel VM context", "error", err)
|
||||
lg.Warn("Failed to cancel VM context", "error", err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,13 +19,13 @@ var rootCmd = &cobra.Command{
|
|||
|
||||
bc, err := builder.NewBuildContext(slog.With("caller", "build-context"), baseISOPath, outImagePath, vmDebugFlag)
|
||||
if err != nil {
|
||||
slog.Error("Failed to create a new build context", "error", err)
|
||||
slog.Error("Failed to create a new build context", "error", err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
err = bc.BuildWithInterruptHandler()
|
||||
if err != nil {
|
||||
slog.Error("Failed to build an image", "error", err)
|
||||
slog.Error("Failed to build an image", "error", err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue