File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -50,10 +50,18 @@ process.on("SIGUSR2", async () => await cleanupJobResources(jobs));
50
50
}
51
51
} ,
52
52
builder : ( y : any ) => {
53
- return y . positional ( "job" , {
54
- describe : "Jobname's to execute" ,
55
- type : "array" ,
56
- } ) ;
53
+ return y
54
+ . positional ( "job" , {
55
+ describe : "Jobname's to execute" ,
56
+ type : "string" , // Type here is referring to each element of the positional args
57
+ } )
58
+ // by default yargs's positional options (args) can be used as options (flags) so this coerce is solely for
59
+ // handling scenario when a single --job option flag is passed
60
+ // Once https://github.com/yargs/yargs/issues/2196 is implemented, we can probably remove this
61
+ . coerce ( "job" , ( args : string [ ] ) => {
62
+ if ( ! Array . isArray ( args ) ) return [ args ] ;
63
+ return args ;
64
+ } ) ;
57
65
} ,
58
66
command : "$0 [job..]" ,
59
67
describe : "Runs the entire pipeline or job's" ,
You can’t perform that action at this time.
0 commit comments