diff --git a/server/core/runtime/run_step_runner.go b/server/core/runtime/run_step_runner.go index 70d084506a..1e3335762c 100644 --- a/server/core/runtime/run_step_runner.go +++ b/server/core/runtime/run_step_runner.go @@ -71,6 +71,11 @@ func (r *RunStepRunner) Run(ctx command.ProjectContext, command string, path str runner := models.NewShellCommandRunner(command, finalEnvVars, path, streamOutput, r.ProjectCmdOutputHandler) output, err := runner.Run(ctx) + if postProcessOutput == valid.PostProcessRunOutputStripRefreshing { + output = StripRefreshingFromPlanOutput(output, tfVersion) + + } + if err != nil { err = fmt.Errorf("%s: running %q in %q: \n%s", err, command, path, output) if !ctx.CustomPolicyCheck { @@ -84,7 +89,7 @@ func (r *RunStepRunner) Run(ctx command.ProjectContext, command string, path str case valid.PostProcessRunOutputHide: return "", nil case valid.PostProcessRunOutputStripRefreshing: - return StripRefreshingFromPlanOutput(output, tfVersion), nil + return output, nil case valid.PostProcessRunOutputShow: return output, nil default: