Skip to content

Commit

Permalink
Revert "Revert ":sparkles: Support task addon succeeded with errors."" (
Browse files Browse the repository at this point in the history
#706)

Reverts #690
  • Loading branch information
shawn-hurley authored Jul 5, 2024
1 parent 0943166 commit 1685b30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addon/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ func (h *Task) Succeeded() {
// Failed report addon failed.
// The reason can be a printf style format.
func (h *Task) Failed(reason string, v ...any) {
h.report.Status = task.Failed
reason = fmt.Sprintf(reason, v...)
h.Error(api.TaskError{
Severity: "Error",
Expand All @@ -137,7 +138,6 @@ func (h *Task) Errorf(severity, description string, v ...any) {

// Error report addon error.
func (h *Task) Error(error ...api.TaskError) {
h.report.Status = task.Failed
for i := range error {
h.report.Errors = append(
h.report.Errors,
Expand Down

0 comments on commit 1685b30

Please sign in to comment.