Skip to content

Commit 7e8430a

Browse files
committed
Off by one error for exit status code
1 parent 4855684 commit 7e8430a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Elastic.Markdown/Diagnostics/DiagnosticsChannel.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ public class DiagnosticsCollector(ILoggerFactory loggerFactory, IReadOnlyCollect
7777

7878
public DiagnosticsChannel Channel { get; } = new();
7979

80-
private long _errors;
81-
private long _warnings;
82-
public long Warnings => _warnings;
83-
public long Errors => _errors;
80+
private int _errors;
81+
private int _warnings;
82+
public int Warnings => _warnings;
83+
public int Errors => _errors;
8484

8585
private Task? _started;
8686

src/docs-builder/Cli/Commands.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public async Task<int> Generate(
6060
var set = new DocumentationSet(context);
6161
var generator = new DocumentationGenerator(set, logger);
6262
await generator.GenerateAll(ctx);
63-
return context.Collector.Errors > 1 ? 1 : 0;
63+
return context.Collector.Errors + context.Collector.Warnings;
6464
}
6565

6666
/// <summary>

0 commit comments

Comments
 (0)