Skip to content

Commit

Permalink
Use internal API to compile user-provided Closure code
Browse files Browse the repository at this point in the history
  • Loading branch information
rednoah committed Feb 4, 2023
1 parent c4f2b13 commit 0025699
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion duplicates.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ order = 'INPUT' .equalsIgnoreCase(_args.order) ? 'INPUT'
: 'SIZE' .equalsIgnoreCase(_args.order) ? 'SIZE'
: 'DATE' .equalsIgnoreCase(_args.order) ? 'DATE'
: 'TIME' .equalsIgnoreCase(_args.order) ? 'TIME'
: _args.order ==~ /^[{].*[}]$/ ? evaluate(_args.order) // e.g. --order '{ a, b -> 0 }'
: _args.order ==~ /^[{].*[}]$/ ? __shell.callable(_args.order) // e.g. --order '{ a, b -> 0 }'
: binary ? 'INPUT' : 'QUALITY'


Expand Down

0 comments on commit 0025699

Please sign in to comment.