Forced BDIO generation is not allowed if Detect has a final failure exit code.
@@ -71,7 +71,7 @@ public class DetectRun {
BdioResult bdio;
Boolean forceBdio = bootSingletons.getDetectConfigurationFactory().forceBdio();
if (!universalToolsResult.getDetectCodeLocations().isEmpty()
- || (productRunData.shouldUseBlackDuckProduct() && !productRunData.getBlackDuckRunData().isOnline() && forceBdio)) {
+ || (productRunData.shouldUseBlackDuckProduct() && !productRunData.getBlackDuckRunData().isOnline() && forceBdio && !universalToolsResult.didAnyFail() && exitCodeManager.getWinningExitCode().isSuccess())) {
bdio = stepRunner.generateBdio(universalToolsResult, nameVersion);
} else {
bdio = BdioResult.none();
