Skip to content
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

Make Settings type detection more robust #1967

Merged
merged 2 commits into from
Feb 20, 2025
Merged

Conversation

Tadas
Copy link
Contributor

@Tadas Tadas commented Feb 16, 2024

PR Summary

It was unable to parse settings hashtable, when that hashtable has been wrapped as a PSObject. This started happening in PS 7.2, I was using Import-PowerShellDataFile to read some settings before passing them on to Invoke-ScriptAnalyzer.

There was some code to handle wrapped strings, might as well do that with all parameter types.

PR Checklist

@Tadas
Copy link
Contributor Author

Tadas commented Feb 16, 2024

Related to #807 but that particular scenario was being covered.

Copy link
Collaborator

@bergmeister bergmeister left a comment

Choose a reason for hiding this comment

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

Thanks and sorry for late review. Kicked off CI and pending that all good.

Copy link
Member

@andyleejordan andyleejordan left a comment

Choose a reason for hiding this comment

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

Hopefully the tests still pass because I didn't test that myself!

@andyleejordan andyleejordan enabled auto-merge (squash) February 20, 2025 22:49
@andyleejordan andyleejordan merged commit dc4ae4b into PowerShell:main Feb 20, 2025
4 checks passed
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