From 7aa4a2bac4b6c08f94d6baef32bc2abbdc4f7ed9 Mon Sep 17 00:00:00 2001 From: TimHuynh Date: Thu, 26 Oct 2023 09:39:57 -0500 Subject: [PATCH] add comment --- executor/linux/step.go | 1 + executor/local/step.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/executor/linux/step.go b/executor/linux/step.go index ff7ccfe0..34b016a7 100644 --- a/executor/linux/step.go +++ b/executor/linux/step.go @@ -152,6 +152,7 @@ func (c *client) ExecStep(ctx context.Context, ctn *pipeline.Container) error { // run the runtime container err = c.Runtime.RunContainer(ctx, ctn, c.pipeline) if err != nil { + // set step status to error and step error _step.SetStatus(constants.StatusError) _step.SetError(err.Error()) diff --git a/executor/local/step.go b/executor/local/step.go index 67b6b28f..36f7e726 100644 --- a/executor/local/step.go +++ b/executor/local/step.go @@ -83,8 +83,10 @@ func (c *client) ExecStep(ctx context.Context, ctn *pipeline.Container) error { // run the runtime container err = c.Runtime.RunContainer(ctx, ctn, c.pipeline) if err != nil { + // set step status to error and step error _step.SetStatus(constants.StatusError) _step.SetError(err.Error()) + return err }