From 1e83ba4b872343390218eef70af7e1f2311dfa80 Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Tue, 15 Oct 2024 20:56:04 -0400 Subject: [PATCH] fix(parser/resultdetail): format on empty error --- internal/parser/resultdetail/parser.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/parser/resultdetail/parser.go b/internal/parser/resultdetail/parser.go index 0d946c8..eb15bb1 100644 --- a/internal/parser/resultdetail/parser.go +++ b/internal/parser/resultdetail/parser.go @@ -33,6 +33,9 @@ func (*ResultDetail) Run(results []stage.ExecutorResult, confAny any) ( comment += fmt.Sprintf("Exit Status: `%d`\n", result.ExitStatus) } if conf.ShowError { + if result.Error == "" { + result.Error = "nil" + } comment += fmt.Sprintf("Error: `%s`\n", result.Error) } if conf.ShowTime {