-
Bug
-
Resolution: Unresolved
-
Minor
-
Jenkins 2.150.1
Pipeline: Groovy plugin 2.62
Defining closure with vararg does not work in a pipeline script:
def fn = {String... args -> echo args.toString()} fn('one', 'two', 'three')
Output: one
Only workaround I can find is to not use closure:
def fn(String... args){echo args.toString()} fn('one', 'two', 'three')
Output: [one, two, three]