-
Notifications
You must be signed in to change notification settings - Fork 155
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
Fix common parameters for PowerShell 7.4.0. #611
base: master
Are you sure you want to change the base?
Conversation
@microsoft-github-policy-service agree |
@@ -2542,7 +2542,8 @@ function ConvertPsObjectsToMamlModel | |||
'InformationVariable', | |||
'OutVariable', | |||
'OutBuffer', | |||
'PipelineVariable' | |||
'PipelineVariable', | |||
'ProgressAction' |
There was a problem hiding this comment.
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(', ')}
There was a problem hiding this comment.
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.
@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. |
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.