Skip to content

Commit 5e1d646

Browse files
committed
Flip the logic
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
1 parent b767561 commit 5e1d646

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pkg/action/scan.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -632,10 +632,10 @@ func processArchive(ctx context.Context, c malcontent.Config, rfs []fs.FS, archi
632632
if err != nil {
633633
// Avoid failing an entire scan when encountering problematic archives
634634
// e.g., joblib_0.8.4_compressed_pickle_py27_np17.gz: not a valid gzip archive
635-
if c.ExitExtraction {
636-
return nil, fmt.Errorf("extract to temp: %w", err)
635+
if !c.ExitExtraction {
636+
return nil, nil
637637
}
638-
return nil, nil
638+
return nil, fmt.Errorf("extract to temp: %w", err)
639639
}
640640
// Ensure that tmpRoot is removed before returning if created successfully
641641
defer func() {

0 commit comments

Comments
 (0)