mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Ignore error from Find-Package (#15999)
This commit is contained in:
1 parent
b09f6973fd
commit
15836f289c
1 file changed
+1
-1
@@ -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, $_)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user