diff --git a/server/core/runtime/post_workflow_hook_runner.go b/server/core/runtime/post_workflow_hook_runner.go index 3125060c53..8f286ac94d 100644 --- a/server/core/runtime/post_workflow_hook_runner.go +++ b/server/core/runtime/post_workflow_hook_runner.go @@ -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 diff --git a/server/core/runtime/pre_workflow_hook_runner.go b/server/core/runtime/pre_workflow_hook_runner.go index 620ae91bc1..622ed81ff6 100644 --- a/server/core/runtime/pre_workflow_hook_runner.go +++ b/server/core/runtime/pre_workflow_hook_runner.go @@ -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