Skip to content

Commit

Permalink
Adjust exit code for binlog extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
tamasvajk committed Jun 6, 2024
1 parent d229009 commit 38660a0
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public static ExitCode Run(string[] args)
};

var compilerCalls = BinaryLogUtil.ReadAllCompilerCalls(fileStream, predicate);
var exitCode = ExitCode.Ok;
var allFailed = true;
foreach (var compilerCall in compilerCalls)
{
var diagnosticName = compilerCall.GetDiagnosticName();
Expand All @@ -130,13 +130,13 @@ public static ExitCode Run(string[] args)
compilerCallOptions.CompilerArguments.AddRange(compilerCall.GetArguments());
logger.LogInfo($"Running extractor on arguments from binary log. Processing {diagnosticName}.");
var ec = Run(compilerCallOptions, logger);
if (ec != ExitCode.Ok)
if (ec != ExitCode.Failed)
{
exitCode = ec;
allFailed &= false;
}
}

return exitCode;
return allFailed ? ExitCode.Failed : ExitCode.Ok;
}
else
{
Expand Down

0 comments on commit 38660a0

Please sign in to comment.