From a3f248425808728f61484f6e7dd612b4a5b67a2d Mon Sep 17 00:00:00 2001 From: Thom Carlin Date: Fri, 25 Oct 2024 07:54:58 -0400 Subject: [PATCH] Fix preexisting test issue --- pkg/workceptor/command.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/workceptor/command.go b/pkg/workceptor/command.go index 8d51de73c..efa6fcd6d 100644 --- a/pkg/workceptor/command.go +++ b/pkg/workceptor/command.go @@ -432,9 +432,9 @@ func (cfg commandRunnerCfg) Run() error { err := commandRunner(cfg.Command, cfg.Params, cfg.UnitDir) if err != nil { statusFilename := path.Join(cfg.UnitDir, "status") - err = (&StatusFileData{}).UpdateBasicStatus(statusFilename, WorkStateFailed, err.Error(), stdoutSize(cfg.UnitDir)) - if err != nil { - MainInstance.nc.GetLogger().Error("Error updating status file %s: %s", statusFilename, err) + err2 := (&StatusFileData{}).UpdateBasicStatus(statusFilename, WorkStateFailed, err.Error(), stdoutSize(cfg.UnitDir)) + if err2 != nil { + MainInstance.nc.GetLogger().Error("Error updating status file %s: %s", statusFilename, err2) } MainInstance.nc.GetLogger().Error("Command runner exited with error: %s\n", err) os.Exit(-1)