From ad6ff570bae6ea5cc8928a292de87be6e8d0dcc9 Mon Sep 17 00:00:00 2001 From: Gary Ewan Park Date: Tue, 30 Apr 2024 02:35:49 -0700 Subject: [PATCH] (#2050) Fix broken integration tests In a previous commit (https://github.com/chocolatey/choco/commit/fb22630c4bead6f53a8361b66eec64db44d35525) a change was made to remove the pinned source dependencies from the list of available packages only when we are not ignoring pinned packages. While this change was valid, it forgot to populate the removedSources property with the results of the call to RemovePinnedSourceDependencies. This was an oversight, and although the change was tested locally, a complete execution of all the integration tests was not performed, which would have caught this problem. --- src/chocolatey/infrastructure.app/services/NugetService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chocolatey/infrastructure.app/services/NugetService.cs b/src/chocolatey/infrastructure.app/services/NugetService.cs index ea7f171255..8a6054dc02 100644 --- a/src/chocolatey/infrastructure.app/services/NugetService.cs +++ b/src/chocolatey/infrastructure.app/services/NugetService.cs @@ -1347,7 +1347,7 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon if (!config.UpgradeCommand.IgnorePinned) { - RemovePinnedSourceDependencies(sourcePackageDependencyInfos, allLocalPackages); + removedSources.AddRange(RemovePinnedSourceDependencies(sourcePackageDependencyInfos, allLocalPackages)); } if (version != null || removedSources.Count == 0)