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") {