When executing a Groovy script build step, where one of the "Script parameters" arguments contains a "|", the Groovy build step fails. Sample Groovy script (for Groovy 3.x; comment out lines 2 and 3 for lower versions):
With "Script parameters" given as "-r foo|bar", this executes the script on Linux and thus prints
while it fails on Windows with
which means the script isn't even executed. I also tried to quote the regex with single or double quotes and escape the "|" with "^" (CMD) or "`" (Powershell) without any luck.
I would expect this to behave exactly the same on Linux and Windows.
|Field||Original Value||New Value|
|Priority||Minor [ 4 ]||Major [ 3 ]|
|Summary||Passing script parameters with "|" works on Linux but fails Windows||Passing script parameters with "|" works on Linux but fails on Windows|
|Summary||Passing script parameters with "|" works on Linux but fails on Windows||Passing script parameters containing "|" works on Linux but fails on Windows|