Skip to content

Commit

Permalink
fix: workflow output not sending output (runatlantis#3091)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabianoshz authored and ijames-gc committed Feb 13, 2024
1 parent 854e0f3 commit 47f6e05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion server/core/runtime/post_workflow_hook_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ func (wh DefaultPostWorkflowHookRunner) Run(ctx models.WorkflowHookCommandContex
}
}

wh.OutputHandler.SendWorkflowHook(ctx, fmt.Sprintf("%s\n", string(out)), true)
wh.OutputHandler.SendWorkflowHook(ctx, string(out), false)
wh.OutputHandler.SendWorkflowHook(ctx, "\n", true)

ctx.Log.Info("successfully ran %q in %q", command, path)
return string(out), strings.Trim(string(customStatusOut), "\n"), nil
Expand Down
3 changes: 2 additions & 1 deletion server/core/runtime/pre_workflow_hook_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ func (wh DefaultPreWorkflowHookRunner) Run(ctx models.WorkflowHookCommandContext
}
}

wh.OutputHandler.SendWorkflowHook(ctx, fmt.Sprintf("%s\n", string(out)), true)
wh.OutputHandler.SendWorkflowHook(ctx, string(out), false)
wh.OutputHandler.SendWorkflowHook(ctx, "\n", true)

ctx.Log.Info("successfully ran %q in %q", command, path)
return string(out), strings.Trim(string(customStatusOut), "\n"), nil
Expand Down

0 comments on commit 47f6e05

Please sign in to comment.