Skip to content

Conversation

@o-l-a-v
Copy link
Contributor

@o-l-a-v o-l-a-v commented Nov 19, 2025

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

#1908

PR Checklist

@o-l-a-v
Copy link
Contributor Author

o-l-a-v commented Nov 19, 2025

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

@anamnavi
Copy link
Member

anamnavi commented Dec 4, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants