Skip to content

Commit 63588d8

Browse files
cottilcawl
authored andcommitted
Small touches to ChangelogCommand
1 parent ebcae58 commit 63588d8

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/tooling/docs-builder/Commands/ChangelogCommand.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,12 @@ public async Task<int> Create(
8080

8181
// Parse PRs: handle both comma-separated values and file paths
8282
string[]? parsedPrs = null;
83-
if (prs != null && prs.Length > 0)
83+
if (prs is { Length: > 0 })
8484
{
8585
var allPrs = new List<string>();
8686
var validPrs = prs.Where(prValue => !string.IsNullOrWhiteSpace(prValue));
8787
foreach (var trimmedValue in validPrs.Select(prValue => prValue.Trim()))
8888
{
89-
90-
// Check if this is a file path
91-
9289
// Check if this is a file path
9390
if (_fileSystem.File.Exists(trimmedValue))
9491
{
@@ -104,7 +101,7 @@ public async Task<int> Create(
104101
}
105102
}
106103
}
107-
catch (System.IO.IOException ex)
104+
catch (IOException ex)
108105
{
109106
collector.EmitError(string.Empty, $"Failed to read PRs from file '{trimmedValue}': {ex.Message}", ex);
110107
return 1;

0 commit comments

Comments
 (0)