Many minor fixes/improvements

This commit is contained in:
AlexSSD7 2023-08-29 10:59:50 +01:00
commit a47b4fc0ec
9 changed files with 53 additions and 39 deletions

View file

@ -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())
}
}
}

View file

@ -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)
}