Skip to content

Commit

Permalink
Bug fix for Import-PSGetRepository in Windows PS (#1460)
Browse files Browse the repository at this point in the history
  • Loading branch information
alerickson authored Oct 27, 2023
1 parent ece1872 commit b22fe33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Microsoft.PowerShell.PSResourceGet.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ function Import-PSGetRepository {
Microsoft.PowerShell.Utility\Write-Verbose ('Found {0} registered PowerShellGet repositories.' -f $PSGetRepositories.Count)

if ($PSGetRepositories.Count) {
$repos = $PSGetRepositories.Values |
$repos = @(
$PSGetRepositories.Values |
Microsoft.PowerShell.Core\Where-Object {$_.PackageManagementProvider -eq 'NuGet'-and $_.Name -ne 'PSGallery'} |
Microsoft.PowerShell.Utility\Select-Object Name, Trusted, SourceLocation
)

Microsoft.PowerShell.Utility\Write-Verbose ('Selected {0} NuGet repositories.' -f $repos.Count)

Expand Down

0 comments on commit b22fe33

Please sign in to comment.