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.