From a528362663248d305d376dc6bd9590424c06d893 Mon Sep 17 00:00:00 2001 From: Kota Kanbe Date: Wed, 1 Mar 2023 14:52:03 +0900 Subject: [PATCH] fix(saas): upload JSON if err occured during scan (#1615) --- subcmds/saas.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/subcmds/saas.go b/subcmds/saas.go index 185091321c..cc513be254 100644 --- a/subcmds/saas.go +++ b/subcmds/saas.go @@ -91,9 +91,8 @@ func (p *SaaSCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) var res models.ScanResults hasError := false for _, r := range loaded { - if len(r.Errors) == 0 { - res = append(res, r) - } else { + res = append(res, r) + if len(r.Errors) != 0 { logging.Log.Errorf("Ignored since errors occurred during scanning: %s, err: %v", r.ServerName, r.Errors) hasError = true