fix(core): update CSV handling to account for the the value already being an array (#14722)
This commit is contained in:
parent
5cee1c19b6
commit
829fb5bbfa
@ -512,7 +512,8 @@ describe('Nx Running Tests', () => {
|
|||||||
runCLI(`generate @nrwl/web:app ${myapp2}`);
|
runCLI(`generate @nrwl/web:app ${myapp2}`);
|
||||||
|
|
||||||
let outputs = runCLI(
|
let outputs = runCLI(
|
||||||
`run-many -t build test -p ${myapp1} ${myapp2} --ci`
|
// Options with lists can be specified using multiple args or with a delimiter (comma or space).
|
||||||
|
`run-many -t build -t test -p ${myapp1} ${myapp2} --ci`
|
||||||
);
|
);
|
||||||
expect(outputs).toContain('Running targets build, test for 2 projects:');
|
expect(outputs).toContain('Running targets build, test for 2 projects:');
|
||||||
|
|
||||||
|
|||||||
@ -1017,10 +1017,13 @@ function withWatchOptions(yargs: yargs.Argv) {
|
|||||||
}, true);
|
}, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseCSV(args: string) {
|
function parseCSV(args: string[] | string) {
|
||||||
if (!args) {
|
if (!args) {
|
||||||
return args;
|
return args;
|
||||||
}
|
}
|
||||||
|
if (Array.isArray(args)) {
|
||||||
|
return args;
|
||||||
|
}
|
||||||
return args.split(',');
|
return args.split(',');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user