Status: Resolved (View Workflow)
In my attempt to fix Jenkins-59529, I modified the powershellScript.ps1 file to wrap the user's script entered in the powershell/pwsh step in a try/catch. That unfortunately precludes the use of certain script elements e.g. [CmdletBinding()] and param() as they must appear at the top of the file before any other script or statements. There is a rather lengthy discussion of this on the GitHub PR that fixed Jenkins-59529 here.
JENKINS-65568 durable-task-plugin v1.36 breaks powershell use of param()
Carroll Chiou added a comment -
rpittcan you confirm if this PR works for you?
Apparently being fixed in https://github.com/jenkinsci/durable-task-plugin/pull/134
Robert Pitt added a comment - Apparently being fixed in https://github.com/jenkinsci/durable-task-plugin/pull/134
rpitt Thanks for confirming.