Skip to content

Commit

Permalink
Revert command.go
Browse files Browse the repository at this point in the history
  • Loading branch information
thom-at-redhat committed Oct 28, 2024
1 parent 4d007a3 commit fdfcec7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/workceptor/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
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)
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)
}
MainInstance.nc.GetLogger().Error("Command runner exited with error: %s\n", err)
os.Exit(-1)
Expand Down

0 comments on commit fdfcec7

Please sign in to comment.