From 428c3485868a7be95ea6776694e30b36badf4b5c Mon Sep 17 00:00:00 2001 From: Thomas Stadler Date: Mon, 10 Apr 2023 22:30:10 +0200 Subject: [PATCH] chore: fix mistake introduced by ab55f157 (#240) Signed-off-by: Thomas Stadler Signed-off-by: Alex Jones --- pkg/analysis/analysis.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/analysis/analysis.go b/pkg/analysis/analysis.go index 96e2ea9..f420ca1 100644 --- a/pkg/analysis/analysis.go +++ b/pkg/analysis/analysis.go @@ -143,7 +143,11 @@ func (a *Analysis) GetAIResults(output string) error { for index, analysis := range a.Results { parsedText, err := a.AIClient.Parse(a.Context, analysis.Error, a.NoCache) if err != nil { - bar.Exit() + // FIXME: can we avoid checking if output is json multiple times? + // maybe implement the progress bar better? + if output != "json" { + bar.Exit() + } // Check for exhaustion if strings.Contains(err.Error(), "status code: 429") {