Skip to content

Fix common parameters for PowerShell 7.4.0. #611

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

Closed
wants to merge 1 commit into from

Conversation

homotechsual
Copy link

PR Summary

This PR adds handling and test coverage for the new -ProgressAction common parameter introduced with PowerShell 7.4.0.

PR Context

Fixes issue #595 see this issue for further detail.

@homotechsual
Copy link
Author

@microsoft-github-policy-service agree

@@ -2542,7 +2542,8 @@ function ConvertPsObjectsToMamlModel
'InformationVariable',
'OutVariable',
'OutBuffer',
'PipelineVariable'
'PipelineVariable',
'ProgressAction'

Choose a reason for hiding this comment

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

This whole section could be replaced with: [System.Management.Automation.PSCmdlet]::CommonParameters that way we can avoid this problem in the future.
In the other sections where it's written out in a string you could do something like: [System.Management.Automation.PSCmdlet]::CommonParameters | foreach -Begin {$Res = ""} -Process {$Res+= "-$_, "} -End {$Res.Trim(', ')}

Choose a reason for hiding this comment

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

Agree that this is the best way to solve for all.

@fflaten
Copy link

fflaten commented Nov 17, 2024

@sdwheeler Could we get a minor release with this soon? Moving to CommonParameters sounds like a v2 improvement 🙂 Just need to fix our broken docs for now.

@5HT2
Copy link

5HT2 commented Jul 10, 2025

@homotechsual
Copy link
Author

I'm happy to rebase this to use CommonParameters if that means a fixed release could be made in the short-to-medium term?

@sdwheeler
Copy link
Collaborator

Thank you for your contribution. We are no longer maintaining the v0.14 version of platyPS. If you’re interested in continuing to help, we’d love your support on the release version of Microsoft.PowerShell.PlatyPS v1.0.0.

@sdwheeler sdwheeler closed this Jul 30, 2025
@sdwheeler sdwheeler added the Resolution-Won't Fix The issue won't be fixed, possibly due to compatibility reason. label Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platyps-0.14.2 Resolution-Won't Fix The issue won't be fixed, possibly due to compatibility reason.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants