error if no files match glob pattern #31

This commit is contained in:
irongut
2022-02-19 01:40:00 +00:00
parent 009a5455b8
commit ce279ec14b
+6
View File
@@ -26,6 +26,12 @@ namespace CodeCoverageSummary
matcher.AddIncludePatterns(o.Files.ToArray());
IEnumerable<string> matchingFiles = matcher.GetResultsInFullPath(".");
if (matchingFiles?.Any() == false)
{
Console.WriteLine("Error: No files found matching glob pattern.");
return -2; // error
}
// check files exist
foreach (var file in matchingFiles)
{