Skip to content

Commit 3350266

Browse files
committed
return config-argv.js to the origin state, and config in config-yargs.js, set boolean default value is null if need it in mapArgToBoolean
Signed-off-by: Pierre Neter <pierreneter@gmail.com>
1 parent 2918287 commit 3350266

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

bin/config-yargs.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,12 +245,14 @@ module.exports = function(yargs) {
245245
"bail": {
246246
type: "boolean",
247247
describe: "Abort the compilation on first error",
248-
group: ADVANCED_GROUP
248+
group: ADVANCED_GROUP,
249+
default: null
249250
},
250251
"profile": {
251252
type: "boolean",
252253
describe: "Profile the compilation and include information in stats",
253-
group: ADVANCED_GROUP
254+
group: ADVANCED_GROUP,
255+
default: null
254256
},
255257
"d": {
256258
type: "boolean",

bin/convert-argv.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,8 @@ module.exports = function(yargs, argv, convertOptions) {
215215
ifArg(name, function(bool) {
216216
if(bool === true)
217217
options[optionName || name] = true;
218-
else if(bool === false) {
219-
if(!options[optionName || name]) {
220-
options[optionName || name] = false;
221-
}
222-
}
218+
else if(bool === false)
219+
options[optionName || name] = false;
223220
});
224221
}
225222

0 commit comments

Comments
 (0)