fix: fix the --no-ci arg parsing
The `noCi` is no properly set based on the `--no-ci` CLI arg and it is overwritten by the `noCi` option
This commit is contained in:
committed by
Gregor Martynus
parent
7e860c7915
commit
0d2d1f2376
@@ -48,8 +48,11 @@ module.exports = async () => {
|
||||
program.outputHelp();
|
||||
process.exitCode = 1;
|
||||
} else {
|
||||
const opts = program.opts();
|
||||
// Set the `noCi` options as commander.js sets the `ci` options instead (becasue args starts with `--no`)
|
||||
opts.noCi = opts.ci === false ? true : undefined;
|
||||
// Remove option with undefined values, as commander.js sets non defined options as `undefined`
|
||||
await require('.')(pickBy(program.opts(), value => !isUndefined(value)));
|
||||
await require('.')(pickBy(opts, value => !isUndefined(value)));
|
||||
}
|
||||
} catch (err) {
|
||||
process.exitCode = 1;
|
||||
|
||||
Reference in New Issue
Block a user