File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
modules/nextflow/src/main/groovy/nextflow/cli Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 17
17
18
18
package nextflow.cli
19
19
20
+ import com.beust.jcommander.DynamicParameter
20
21
import com.beust.jcommander.Parameter
21
22
import com.beust.jcommander.Parameters
22
23
import groovy.transform.CompileStatic
@@ -38,6 +39,9 @@ class CmdPlugin extends CmdBase {
38
39
return ' plugin'
39
40
}
40
41
42
+ @DynamicParameter (names = " --" , description = " Custom plugin parameters go here" , hidden = true )
43
+ private Map<String , String > params = new HashMap<> ();
44
+
41
45
@Parameter (hidden = true )
42
46
List<String > args
43
47
@@ -69,6 +73,12 @@ class CmdPlugin extends CmdBase {
69
73
throw new AbortOperationException (" Cannot find target plugin: $target " )
70
74
final plugin = wrapper. getPlugin()
71
75
if ( plugin instanceof PluginExecAware ) {
76
+ def mapped = [] as List<String >
77
+ params. entrySet(). each{
78
+ mapped << " --$it . key " . toString()
79
+ mapped << " $it . value " . toString()
80
+ }
81
+ args. addAll(mapped)
72
82
final ret = plugin. exec(getLauncher(), target, cmd, args)
73
83
// use explicit exit to invoke the system shutdown hooks
74
84
System . exit(ret)
You can’t perform that action at this time.
0 commit comments