diff --git a/pkg/analysis/analysis.go b/pkg/analysis/analysis.go index 9f04bcb665..6dd54b6ecb 100644 --- a/pkg/analysis/analysis.go +++ b/pkg/analysis/analysis.go @@ -142,7 +142,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") {