Skip to content

Commit e7cae8d

Browse files
authored
fix(ci): fail on broken examples (#349)
Follow-up to #347
1 parent 3299d51 commit e7cae8d

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

EnumerableAsyncProcessor.Example/DisposalExample.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ private static async Task<IReadOnlyList<int>> ProblematicPatternAsync(int[] inpu
7676
}
7777

7878
// 🔥 RESOURCE LEAK: The processor goes out of scope without being disposed,
79-
// potentially leaving tasks running and resources uncleaned
79+
// leaving its disposal resources uncleaned
8080
return results;
8181
}
8282

EnumerableAsyncProcessor.Pipeline/Modules/BuildExampleProjectsModule.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using ModularPipelines.Git.Extensions;
55
using ModularPipelines.Models;
66
using ModularPipelines.Modules;
7+
using ModularPipelines.Options;
78

89
namespace EnumerableAsyncProcessor.Pipeline.Modules;
910

@@ -14,6 +15,10 @@ public class BuildExampleProjectsModule : Module<List<CommandResult>>
1415
CancellationToken cancellationToken)
1516
{
1617
var results = new List<CommandResult>();
18+
var executionOptions = new CommandExecutionOptions
19+
{
20+
ThrowOnNonZeroExitCode = true,
21+
};
1722

1823
foreach (var exampleProjectFile in context
1924
.Git().RootDirectory
@@ -24,7 +29,7 @@ public class BuildExampleProjectsModule : Module<List<CommandResult>>
2429
{
2530
ProjectSolution = exampleProjectFile.Path,
2631
Configuration = "Release",
27-
}, cancellationToken: cancellationToken));
32+
}, executionOptions: executionOptions, cancellationToken: cancellationToken));
2833
}
2934

3035
return results;

0 commit comments

Comments
 (0)