Skip to content

Commit 2918287

Browse files
authored
Fixed set boolean options in config file.
1 parent 215abf6 commit 2918287

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

bin/convert-argv.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,6 @@ module.exports = function(yargs, argv, convertOptions) {
173173
var noOutputFilenameDefined = !options.output || !options.output.filename;
174174

175175
function ifArg(name, fn, init, finalize) {
176-
if(typeof options[name] === "boolean") {
177-
argv[name] = options[name];
178-
}
179176
if(Array.isArray(argv[name])) {
180177
if(init) {
181178
init();
@@ -218,8 +215,11 @@ module.exports = function(yargs, argv, convertOptions) {
218215
ifArg(name, function(bool) {
219216
if(bool === true)
220217
options[optionName || name] = true;
221-
else if(bool === false)
222-
options[optionName || name] = false;
218+
else if(bool === false) {
219+
if(!options[optionName || name]) {
220+
options[optionName || name] = false;
221+
}
222+
}
223223
});
224224
}
225225

0 commit comments

Comments
 (0)