diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs index a2cfa5669df0..50f673a71581 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs @@ -161,7 +161,15 @@ static bool filter(CompilerCall compilerCall) var allCompilationData = reader.ReadAllCompilationData(filter); var allFailed = true; - logger.LogInfo($" Found {allCompilationData.Count} compilations in binary log"); + if (allCompilationData.Count == 0) + { + logger.LogWarning(" No compilations found in binary log."); + return ExitCode.Ok; + } + else + { + logger.LogInfo($" Found {allCompilationData.Count} compilations in binary log"); + } foreach (var compilationData in allCompilationData) {