Open petterw03 opened 3 years ago
I think this bug is weird because you would think that this line here https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli/lib/invoke.js#L64 would automatically parse the boolean value:
pluginOptions = JSON.parse($inlineOptions)
But for some reason it doesn't.
Version
4.5.13
Reproduction link
https://github.com/Yleisradio/vue-cli-plugin-yddviz
Environment info
Steps to reproduce
Invoke the plugin for example like this:
vue add yddviz --projectName test-project --externalContent true
orvue add yddviz --projectName test-project --externalContent y
What is expected?
Since the externalContent option is of type confirm, it should be parsed as an boolean, in the same way as if you enter the prompts manually (by using just
vue add yddviz
). package.json in the vue project should include the following after invoking the plugin:What is actually happening?
The externalContent option is parsed like a string instead of a boolean.