Skip to content

Commit

Permalink
fix: workflow output not sending output (#3091)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabianoshz authored Feb 18, 2023
1 parent 781d9ac commit 40f4e8c
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 40f4e8c

Please sign in to comment.