Closed kborowinski closed 10 months ago
thanks for reporting @kborowinski this needs investigation
I wasn't able to repro this. @kborowinski if you open the xml file here: %LocalAppData%\PSResourceGet\PSResourceRepository.xml
do you only see the PSGallery registered? If so can you delete this file then try running Import-PSGetRepository -Verbose -Force
again?
@alerickson:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<Repository Name="PSGallery" Url="https://www.powershellgallery.com/api/v2" APIVersion="v2" Priority="50" Trusted="false" />
</configuration>
Import-PSGetRepository -Verbose -Force
does not help.I must stress that this bug happens only on PowerShell 5.1, not on PowerShell 7.3.8 or higher. I've tried this on six different computers now, with the same results (two domain members and two standalone at work, and two at home)
Visuals:
As you can see in the verbose output of command Import-PSGetRepository -Verbose -Force
on PowerShell 5.1, it looks like the cmdlet finds two repos but nothing gets registered -> Verbose: Selected NuGet repositories.:
On PowerShell 7.3.8 it looks like this:
And for completeness, visuals on the PowerShell 7.3.8:
If you want me to do any more tests, will be glad to help!
@SydneyhSmith @alerickson OK, I've found the issue with Import-PSResourceGet
on PowerShell 5.1. and will push a PR later today.
Edit: I've missed your PR request, sorry. If I can suggest a slight change to the proposed PR as there is still a problem with verbose message on PowerShell 5.1
Prerequisites
Steps to reproduce
Import-PSGetRepository
fails silently to import UNC based PowerShellGet v2 repositories on PowerShell 5.1 (It works on PowerShell 7.3.8)Steps to reproduce:
Expected behavior
Actual behavior
Error details
Environment data
Visuals
No response