Skip to content

Commit

Permalink
Fix ExtractChangelogSectionNotes not throwing the intended exception
Browse files Browse the repository at this point in the history
  • Loading branch information
sandrofigo committed Feb 10, 2023
1 parent 74b489a commit 7a08ecb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/Nuke.Common/ChangeLog/ChangeLogTasks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public static IEnumerable<string> ExtractChangelogSectionNotes(string changelogF
var sections = GetReleaseSections(content);
var section = tag == null
? sections.First(x => x.StartIndex < x.EndIndex)
: sections.First(x => x.Caption.EqualsOrdinalIgnoreCase(tag)).NotNull($"Could not find release section for '{tag}'.");
: sections.FirstOrDefault(x => x.Caption.EqualsOrdinalIgnoreCase(tag)).NotNull($"Could not find release section for '{tag}'.");

return content
.Skip(section.StartIndex + 1)
Expand Down

0 comments on commit 7a08ecb

Please sign in to comment.