From 4cfaac9e69b8015482eaaf20df3d767ed50b88a1 Mon Sep 17 00:00:00 2001 From: Rob Geada Date: Mon, 11 Nov 2024 14:53:07 +0000 Subject: [PATCH] Fix error return of the pod log writer --- controllers/lmes/driver/driver.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/lmes/driver/driver.go b/controllers/lmes/driver/driver.go index 3520de24..13bc650b 100644 --- a/controllers/lmes/driver/driver.go +++ b/controllers/lmes/driver/driver.go @@ -290,7 +290,7 @@ type PodLogAndPipeWriter struct { func (f PodLogAndPipeWriter) Write(p []byte) (n int, err error) { // format lm-eval output to stdout and the pipewriter line := string(p) - fmt.Print(line) + res, _ := fmt.Print(line) if _, err := f.pw.Write(p); err != nil { return 0, err } @@ -303,7 +303,7 @@ func (f PodLogAndPipeWriter) Write(p []byte) (n int, err error) { return 0, err } } - return 0, nil + return res, nil } func (d *driverImpl) exec() error {