Skip to content

Conversation

craftzdog
Copy link
Contributor

It allows you to pass array options via CLI arguments.

@fcastilloec
Copy link
Collaborator

You can already pass array options with yargs if you specify the option more than once. For example:

electron-installer-redhat --src src_dir --dest dest_dir --arch x86_64 --options.categories Audio --options.categories Music

That will pass the array ['Audio', 'Music']

@craftzdog
Copy link
Contributor Author

No, you have to specify at least two values so that the command recognizes the option is an array.
For example, it doesn't work:

electron-installer-redhat --src src_dir --dest dest_dir --arch x86_64 --options.mimeType x-scheme-handler/inkdrop

It recognizes mimeType as string, not array, which causes an error.

@fcastilloec
Copy link
Collaborator

No, you have to specify at least two values so that the command recognizes the option is an array.
For example, it doesn't work:

electron-installer-redhat --src src_dir --dest dest_dir --arch x86_64 --options.mimeType x-scheme-handler/inkdrop

It recognizes mimeType as string, not array, which causes an error.

Sure, but as a workaround, you can just do:

electron-installer-redhat --src src_dir --dest dest_dir --arch x86_64 --options.mimeType x-scheme-handler/inkdrop --options.mimeType ''

Only until a new release with this code gets published.

@craftzdog
Copy link
Contributor Author

Added a definition for options.requires

@fcastilloec fcastilloec merged commit 7dadefa into electron-userland:master Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants