Skip to content

Commit

Permalink
apply strip_refreshing to output for errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudomorph committed Apr 30, 2024
1 parent 94791d5 commit 36dbb4f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/core/runtime/run_step_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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:
Expand Down

0 comments on commit 36dbb4f

Please sign in to comment.