-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Config file array files should be recognized as options of array type #1199
fix: Config file array files should be recognized as options of array type #1199
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hah. I can't believe we missed this. We should support number
too.
@@ -66,7 +66,11 @@ export function applyConfigToArgv({ | |||
const expectedType = options[decamelizedOptName].type === | |||
'count' ? 'number' : options[decamelizedOptName].type; | |||
|
|||
const optionType = typeof configObject[option]; | |||
const optionType = ( | |||
Array.isArray(configObject[option]) ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh man, duh. 🧀
@@ -66,7 +66,11 @@ export function applyConfigToArgv({ | |||
const expectedType = options[decamelizedOptName].type === | |||
'count' ? 'number' : options[decamelizedOptName].type; | |||
|
|||
const optionType = typeof configObject[option]; | |||
const optionType = ( | |||
Array.isArray(configObject[option]) ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you're in here, could you also add support for number types like this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, sorry, I thought that it would need special handling but it does not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore me about number
, I was mistaken. Looks great!
This PR contains the changes (and additional test case) to fix #1198