From d5a758bc92756b8d5546b4fc3c44ef92ef21f9be Mon Sep 17 00:00:00 2001 From: motatoes Date: Thu, 8 Aug 2024 17:10:27 +0100 Subject: [PATCH] print exact error on failure --- cli/pkg/spec/next.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/pkg/spec/next.go b/cli/pkg/spec/next.go index e3c1c95a5..f23a4d3ba 100644 --- a/cli/pkg/spec/next.go +++ b/cli/pkg/spec/next.go @@ -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) } } @@ -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)