in src/argsParser.js [71:88]
function validateOptions(parsedOptions, options) {
const errors = [];
for (const optionName in options) {
const option = options[optionName];
if (option.choices && !option.choices.includes(parsedOptions[optionName])) {
errors.push(
`Error: --${option.full} must be one of the values ${option.choices.join(',')}`
);
}
}
if (errors.length > 0) {
throwError(
1,
errors.join('\n'),
getHelpText(options)
);
}
}