From 6c8b90a1abc330c4e05307ddb268b084a02cd2a3 Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Thu, 21 Aug 2025 11:35:15 +0200 Subject: vm: extract all the crashes from the log --- pkg/build/netbsd.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/build') 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 } -- cgit mrf-deployment