Skip to content

Commit 20e2e56

Browse files
committed
C#: Exclude TryRestoreManually fallback without nugetSources when private registries are configured (to make implementation consistent).
1 parent d5a7058 commit 20e2e56

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/NugetPackageRestorer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ private bool TryRestorePackageManually(string package, List<string> nugetSources
460460
return true;
461461
}
462462

463-
if (!feedManager.CheckNugetFeedResponsiveness && res.HasNugetPackageSourceError && nugetSources.Count > 0)
463+
if (!feedManager.CheckNugetFeedResponsiveness && !feedManager.HasPrivateRegistryFeeds && res.HasNugetPackageSourceError && nugetSources.Count > 0)
464464
{
465465
logger.LogDebug($"Trying to restore '{package}' without explicitly providing NuGet sources.");
466466
// Restore could not be completed because the listed source is unavailable. Try without an explicit restore source argument.

0 commit comments

Comments
 (0)