Skip to content

Add TryPSGetInfo utility function to read resource installation file data #361

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 26, 2021
Merged

Conversation

PaulHigin
Copy link
Contributor

PR Summary

This PR adds a new TryPSGetInfo utility method to read a PSGetModuleInfo.xml file.

PR Context

The PSGetModuleInfo.xml file is a PowerShell serialization file that contains information about an installed module or other resource type. The format of the install information is inconsistent but appears to be the same for all installed resources. This method can be modified as needed to accommodate other resource types if needed.

Testing adds an example xml file for now, but eventually should be expanded to include writing this installation information and then reading it.

PR Checklist

Copy link
Member

@anamnavi anamnavi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I like the idea of having the CheckForExpectedPSGetInfo function in PSGetTestUtils file.

@PaulHigin PaulHigin merged commit f2d624c into PowerShell:development Apr 26, 2021
@PaulHigin PaulHigin deleted the psgetinfo branch June 22, 2021 15:56
anamnavi pushed a commit that referenced this pull request Sep 7, 2022
…data (#361)

* Add TryPSGetInfo utility function

* Fix Codacy and test issues

* Fix DateTime tests

* Rename method

* Add TryWritePSGetInfo utility method

* Fix Codacy issue

* Small syntax change

* Address CR comments
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.

3 participants