diff --git a/src/Microsoft.ComponentDetection.Detectors/pip/PipReportComponentDetector.cs b/src/Microsoft.ComponentDetection.Detectors/pip/PipReportComponentDetector.cs index 5e074786e..ead2ade5a 100644 --- a/src/Microsoft.ComponentDetection.Detectors/pip/PipReportComponentDetector.cs +++ b/src/Microsoft.ComponentDetection.Detectors/pip/PipReportComponentDetector.cs @@ -132,8 +132,6 @@ protected override async Task OnFileFoundAsync(ProcessRequest processRequest, ID ExceptionMessage = e.Message, StackTrace = e.StackTrace, }; - - throw; } finally { diff --git a/test/Microsoft.ComponentDetection.Detectors.Tests/PipReportComponentDetectorTests.cs b/test/Microsoft.ComponentDetection.Detectors.Tests/PipReportComponentDetectorTests.cs index cd6d92630..891dc4d1d 100644 --- a/test/Microsoft.ComponentDetection.Detectors.Tests/PipReportComponentDetectorTests.cs +++ b/test/Microsoft.ComponentDetection.Detectors.Tests/PipReportComponentDetectorTests.cs @@ -163,10 +163,11 @@ public async Task TestPipReportDetector_CatchesExceptionAsync() this.pipCommandService.Setup(x => x.GenerateInstallationReportAsync(It.IsAny(), It.IsAny())) .ThrowsAsync(new InvalidCastException()); - var action = async () => await this.DetectorTestUtility + var (result, componentRecorder) = await this.DetectorTestUtility .WithFile("setup.py", string.Empty) .ExecuteDetectorAsync(); - await action.Should().ThrowAsync(); + + result.ResultCode.Should().Be(ProcessingResultCode.Success); this.mockLogger.Verify(x => x.Log( LogLevel.Warning,