Mariusz Nowak c9be9bcc45 fix(CLI): Do not assume "string" param type, when not type set
Plugins do not set "type" on options they propose, and if they're boolean options, treating them as strings breaks handling
2021-04-02 13:04:48 +02:00

11 lines
288 B
JavaScript

'use strict';
module.exports = {
help: { usage: 'Show this message', shortcut: 'h', type: 'boolean' },
version: { usage: 'Show version info', type: 'boolean' },
};
for (const optionSchema of Object.values(module.exports)) {
if (!optionSchema.type) optionSchema.type = 'string';
}