Skip to content

Commit

Permalink
print exact error on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
motatoes committed Aug 8, 2024
1 parent 7bb0f8f commit d5a758b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cli/pkg/spec/next.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
func reporterError(spec spec.Spec, backendApi backend2.Api, err error) {
_, reportingError := backendApi.ReportProjectJobStatus(spec.VCS.RepoName, spec.Job.ProjectName, spec.JobId, "failed", time.Now(), nil, "", "")
if reportingError != nil {
usage.ReportErrorAndExit(spec.VCS.RepoOwner, fmt.Sprintf("Failed run commands. %s", err), 5)
usage.ReportErrorAndExit(spec.VCS.RepoOwner, fmt.Sprintf("Failed to run commands. %v", err), 5)
}
}

Expand Down Expand Up @@ -162,11 +162,11 @@ func RunSpecNext(
if !allAppliesSuccess || err != nil {
_, reportingError := backendApi.ReportProjectJobStatus(spec.VCS.RepoName, spec.Job.ProjectName, spec.JobId, "failed", time.Now(), nil, "", "")
if reportingError != nil {
usage.ReportErrorAndExit(spec.VCS.RepoOwner, fmt.Sprintf("Failed run commands. %s", err), 5)
usage.ReportErrorAndExit(spec.VCS.RepoOwner, fmt.Sprintf("Failed run commands. %v", err), 5)
}
//commentUpdater.UpdateComment(serializedBatch.Jobs, serializedBatch.PrNumber, prService, commentId)
//digger.UpdateAggregateStatus(serializedBatch, prService)
usage.ReportErrorAndExit(spec.VCS.RepoOwner, fmt.Sprintf("Failed to run commands. %s", err), 5)
usage.ReportErrorAndExit(spec.VCS.RepoOwner, fmt.Sprintf("Failed to run commands. %v", err), 5)
}
usage.ReportErrorAndExit(spec.VCS.RepoOwner, "Digger finished successfully", 0)

Expand Down

0 comments on commit d5a758b

Please sign in to comment.