Skip to content

Commit 932b599

Browse files
committed
Generate a reproducer only when a task has failed as it can receive a signal for other reasons.
Specifically, cancellation can trigger a signal too. PrecompileClangModuleTaskAction is already doing the same thing, so no changes there.
1 parent ad99c96 commit 932b599

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SWBTaskExecution/TaskActions/ClangCompileTaskAction.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ public final class ClangCompileTaskAction: TaskAction, BuildValueValidatingTaskA
319319
outputDelegate.emitOutput(ByteString(encodingAsUTF8: commandString) + "\n")
320320
}
321321

322-
if case .some(.exit(.uncaughtSignal, _)) = outputDelegate.result {
322+
if case .some(.failed) = lastResult, case .some(.exit(.uncaughtSignal, _)) = outputDelegate.result {
323323
do {
324324
if let reproducerMessage = try clangModuleDependencyGraph.generateReproducer(
325325
forFailedDependency: dependencyInfo,

0 commit comments

Comments
 (0)