chore: fix mistake introduced by ab55f157 (#240)

Signed-off-by: Thomas Stadler <thomas@thomasst.xyz>
This commit is contained in:
Thomas Stadler
2023-04-10 22:30:10 +02:00
committed by GitHub
parent 992b107c2d
commit 3845d4747f

View File

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