diff options
Diffstat (limited to 'pkg/build')
| -rw-r--r-- | pkg/build/netbsd.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/build/netbsd.go b/pkg/build/netbsd.go index 21564e1aa..199ebc424 100644 --- a/pkg/build/netbsd.go +++ b/pkg/build/netbsd.go @@ -158,13 +158,13 @@ func (ctx netbsd) copyKernelToDisk(targetArch, vmType, outputDir, kernel string) commands = append(commands, "sync") // Run sync so that the copied image is stored properly. ctxTimeout, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() - _, rep, err := inst.Run(ctxTimeout, reporter, strings.Join(commands, ";")) + _, reps, err := inst.Run(ctxTimeout, reporter, strings.Join(commands, ";")) if err != nil { return fmt.Errorf("error syncing the instance %w", err) } // Make sure that the command has executed properly. - if rep != nil { - return fmt.Errorf("error executing sync: %v", rep.Title) + if len(reps) > 0 { + return fmt.Errorf("error executing sync: %v", reps[0].Title) } return nil } |
