PSResourceGet icon indicating copy to clipboard operation
PSResourceGet copied to clipboard

Fix 1908 - Version from API differs from manifest

Open o-l-a-v opened this issue 2 months ago • 2 comments

PR Summary

Prefer version from the .psd1 manifest file if the version returned from the repository API is different. Else Import-Module fails, saying the manifest is not valid.

I used Copilot to mock up needed changes. I implemented and tested them with modifications myself. Built the module and thested Install-PSResource, like linked issue described.

PR Context

https://github.com/PowerShell/PSResourceGet/issues/1908

PR Checklist

o-l-a-v avatar Nov 19 '25 21:11 o-l-a-v

Tests: Suggestions on how to test this without adding test against pwsh.gallery for this specific case? 🤔

o-l-a-v avatar Nov 19 '25 21:11 o-l-a-v

thanks for the PR @o-l-a-v . The team needs to consider the design for the issue and decide. The design your solution suggests will be considered too, but I think we should leverage the existing version parsing and metadata file prioritization code that is already used for Local file share repositories and refactor that code out to a shared location (if not already done) for it to be used here. We would also need to consider preview versions (which are stored differently in .psd1 files versus .nuspec files), a package containing multiple .psd1 files, etc.

anamnavi avatar Dec 04 '25 20:12 anamnavi