From 15836f289cab3f2a2f8c6afb0bd8fe2cc3adba1b Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Wed, 25 Aug 2021 15:59:58 -0700 Subject: [PATCH] Ignore error from `Find-Package` (#15999) --- tools/UpdateDotnetRuntime.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/UpdateDotnetRuntime.ps1 b/tools/UpdateDotnetRuntime.ps1 index f02f35da86..cbaa69bfd0 100644 --- a/tools/UpdateDotnetRuntime.ps1 +++ b/tools/UpdateDotnetRuntime.ps1 @@ -114,7 +114,7 @@ function Update-PackageVersion { # We have to find packages for all sources separately as Find-Package does not return all packages when both sources are provided at the same time. # Since there will be a lot of duplicates we add the package to a dictionary so we only get a unique set by version. $source | ForEach-Object { - Find-Package -Name $pkgName -AllVersions -AllowPrereleaseVersions -Source $_ | ForEach-Object { + Find-Package -Name $pkgName -AllVersions -AllowPrereleaseVersions -Source $_ -ErrorAction SilentlyContinue | ForEach-Object { if (-not $pkgs.ContainsKey($_.Version)) { $pkgs.Add($_.Version, $_) }