chore: fix mistake introduced by ab55f157 (#240)

Signed-off-by: Thomas Stadler <thomas@thomasst.xyz>
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
This commit is contained in:
Thomas Stadler 2023-04-10 22:30:10 +02:00 committed by Alex Jones
parent db1388fd20
commit 428c348586

View File

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