From e2320cb7d79331310f058fcaf8345df3cca3f06a Mon Sep 17 00:00:00 2001 From: elsapet Date: Mon, 16 Oct 2023 11:51:57 +0200 Subject: [PATCH] fix: always force a diff scan (#1332) --- internal/commands/artifact/run.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/commands/artifact/run.go b/internal/commands/artifact/run.go index 286bf0295..0bde6463d 100644 --- a/internal/commands/artifact/run.go +++ b/internal/commands/artifact/run.go @@ -103,7 +103,8 @@ func NewRunner( log.Debug().Msgf("creating report %s", path) if _, err := os.Stat(completedPath); err == nil { - if !scanSettings.Scan.Force { + if !scanSettings.Scan.Force && scanSettings.Scan.DiffBaseBranch == "" { + // force is not set, and we are not running a diff scan r.reuseDetection = true log.Debug().Msgf("reuse detection for %s", path) r.reportPath = completedPath