Skip to content

Commit 52c74c4

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 46fe04c commit 52c74c4

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
@@ -302,7 +302,7 @@ public final class ClangCompileTaskAction: TaskAction, BuildValueValidatingTaskA
302302
outputDelegate.emitOutput(ByteString(encodingAsUTF8: commandString) + "\n")
303303
}
304304

305-
if case .some(.exit(.uncaughtSignal, _)) = outputDelegate.result {
305+
if case .some(.failed) = lastResult, case .some(.exit(.uncaughtSignal, _)) = outputDelegate.result {
306306
do {
307307
if let reproducerMessage = try clangModuleDependencyGraph.generateReproducer(
308308
forFailedDependency: dependencyInfo,

0 commit comments

Comments
 (0)