diff --git a/internal/commands/result.go b/internal/commands/result.go index 0115faa60..68e53ee3e 100644 --- a/internal/commands/result.go +++ b/internal/commands/result.go @@ -56,6 +56,7 @@ const ( directDependencyType = "Direct Dependency" indirectDependencyType = "Transitive Dependency" startedStatus = "started" + requestedStatus = "requested" completedStatus = "completed" exportingStatus = "Exporting" pendingStatus = "Pending" @@ -1148,11 +1149,12 @@ func exportPdfResults(pdfWrapper wrappers.ResultsPdfWrapper, summary *wrappers.R log.Println("Generating PDF report") pollingResp.Status = startedStatus - for pollingResp.Status == startedStatus { + for pollingResp.Status == startedStatus || pollingResp.Status == requestedStatus { pollingResp, webErr, err = pdfWrapper.CheckPdfReportStatus(pdfReportID.ReportID) if err != nil || webErr != nil { return errors.Wrapf(err, "%v", webErr) } + logger.PrintfIfVerbose("PDF report status: %s", pollingResp.Status) time.Sleep(delayValueForReport * time.Millisecond) } if pollingResp.Status != completedStatus {