Skip to content
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

Array types #36

Closed
1 of 3 tasks
egoist opened this issue Dec 2, 2018 · 1 comment
Closed
1 of 3 tasks

Array types #36

egoist opened this issue Dec 2, 2018 · 1 comment

Comments

@egoist
Copy link
Collaborator

egoist commented Dec 2, 2018

Issue Type

  • Bug Report
  • Feature Request
  • Other

Expected

cli.option('--externals <external>', 'Add externals (can be used for multiple times)', {
  type: [String]
})
--externals foo
# options: { externals: ['foo'] }

--externals foo --externals bar
# options: { externals: ['foo', 'bar'] }

Actual

--externals foo
# options: { externals: 'foo' }

--externals foo --externals bar
# options: { externals: ['foo', 'bar'] }

Re: #24

Solution

Add a type option to cli.option and command.option methods.

@egoist
Copy link
Collaborator Author

egoist commented Jan 10, 2019

Landed in 6.4.0

@egoist egoist closed this as completed Jan 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant