Skip to content

Commit

Permalink
Handle duplicate packages in nuget cache (nuke-build#1386)
Browse files Browse the repository at this point in the history
Fixes problem introduced in .NET SDK 8
dotnet/sdk#40528
  • Loading branch information
ChristophLindemann committed May 28, 2024
1 parent 6eb7796 commit f91c77d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/Nuke.Tooling/NuGetPackageResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public static InstalledPackage GetGlobalInstalledPackage(

return versionRange == null
? candidatePackages.FirstOrDefault()
: candidatePackages.SingleOrDefault(x => x.Version == versionRange.FindBestMatch(candidatePackages.Select(y => y.Version)));
: candidatePackages.FirstOrDefault(x => x.Version == versionRange.FindBestMatch(candidatePackages.Select(y => y.Version)));
}

[CanBeNull]
Expand Down

0 comments on commit f91c77d

Please sign in to comment.