From fbe0c63bdb0199dcfbe2bc8c150d9b73a04cd624 Mon Sep 17 00:00:00 2001 From: theolivenbaum Date: Mon, 9 Feb 2026 14:29:31 +0100 Subject: [PATCH] Fix project glob handling to support just filename filtering --- src/NuGetLicense/LicenseValidationOrchestrator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NuGetLicense/LicenseValidationOrchestrator.cs b/src/NuGetLicense/LicenseValidationOrchestrator.cs index c870e6eb..cc90d0aa 100644 --- a/src/NuGetLicense/LicenseValidationOrchestrator.cs +++ b/src/NuGetLicense/LicenseValidationOrchestrator.cs @@ -70,7 +70,7 @@ public async Task ValidateAsync(ICommandLineOptions options, CancellationTo ignoredPackagesArray); string[] excludedProjectsArray = _optionsParser.GetExcludedProjects(options.ExcludedProjects); - IEnumerable projects = (await inputFiles.SelectManyAsync(projectCollector.GetProjectsAsync)).Where(p => !Array.Exists(excludedProjectsArray, ignored => p.Like(ignored))); + string[] projects = (await inputFiles.SelectManyAsync(projectCollector.GetProjectsAsync)).Where(p => excludedProjectsArray.All(m => !p.Like(m) && !_fileSystem.Path.GetFileName(p).Like(m))).ToArray(); IEnumerable packagesForProject = GetPackagesPerProject(projects, projectReader, options.IncludeTransitive, options.TargetFramework, options.IncludeSharedProjects, out IReadOnlyCollection projectReaderExceptions); IAsyncEnumerable downloadedLicenseInformation = packagesForProject.SelectMany(p => GetPackageInformations(p, overridePackageInformationArray, cancellationToken));