-
Notifications
You must be signed in to change notification settings - Fork 136
Conversation
Can someone please let me know if this issue is fixed or not ? If fixed where/what is the fix ? From reading the associated thread it appears that the issue is due to the slash at the end of the URL ( https://www.powershellgallery.com/api/v2 ) but whether I have a slash or not it doesn't seem to make any difference for me and I get the same error. |
A fix exists but a binary package containing that fix has not yet been released - hopefully very soon now. |
Thanks |
Any word on this yet ? |
Use PowerShellGet 2.1.0 or above, out now wherever PowerShell modules are sold ;-) |
Thanks it works ! |
Respectfully, how do I update PowerShellGet to the latest version when the Install-Module functionality is broken and running Update-Module -Name PowerShellGet produces an error "Update-Module : Module 'powershellget' was not installed by using Install-Module, so it cannot be updated." (Server 2012 R2 shipped with WMF 4.0 and I upgraded to WMF 5.1 a while back). It kind of feels like a catch-22. I've been struggling through issues with PowerShellGet's Install-Module for a couple of weeks until I came across this thread and it's relatives, but still haven't been able to fix it. Any advice in getting PowerShellGet updated in my situation would be much appreciated. |
@Dyermull Can you please file an issue for this with repro steps? I'll take a look at this |
@alerickson Will do, thanks! |
Should resolve #349 and #401
When a module is installed, we store the SourceLocation at that time. When you run Update-Module, it looks for a source which matches that saved location. When the two do not match, the update fails. The expected URL for the PowerShellGallery is https://www.powershellgallery.com/api/v2 , but some operation (it is still not clear exactly what) has led to some users having the gallery URL as https://www.powershellgallery.com/api/v2/ - with a trailing /.
This is treated as the same URL by the web server but is different-enough that Update-Module sees the saved and current repository sources as different.
This change makes it so that when we look for a repository by URL/path we ignore trailing / or \ characters when comparing them. This should resolve the practical issues people are hitting with Update-Module.