Skip to content

Commit

Permalink
Handle no-duplicates-found case (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
codeconscious authored May 5, 2024
1 parent 48b8657 commit a48eaf8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions AudioTagger.Console/TagDuplicateFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ public void Start(
.ToImmutableArray();

int groupCount = duplicateGroups.Length;

if (groupCount == 0)
{
printer.Print($"No duplicates were found after {watch.ElapsedFriendly}.");
return;
}

printer.Print($"Found {groupCount} duplicate group{(groupCount == 1 ? string.Empty : "s")} in {watch.ElapsedFriendly}.");
PrintResults(duplicateGroups, printer);

Expand Down

0 comments on commit a48eaf8

Please sign in to comment.