I try to pipe
yes through a CLI that asks the user a bunch of questions (works like a yeoman generator), but it gets stuck at the first input.
I’m a maintainer of VueJS, and we have a CLI (vue-cli) which can create proect boilerplate from templates. One of those template is the project that I want to test with CircleCI 2.0.
We already use CircleCI 1.0, you can see the old config here.
Basically, it run a bash script, which looks like this:
set -e yes "" | ./node_modules/.bin/vue init . test
It basically runs the vue-cli executable, which asks the user a bunch of questions, and simply answers “yes” to all of them, accepting the defaults.
But it gets stuck on the first required input, and after a while, it crashes, saying node is out of memory:
Here’s the config,yml I used for 2.0:
- run: name: make executable command: chmod +x test.sh - run: name: install template command: ./test.sh
I also tried to run the command directly in the config:
- run: name: install template command: yes "" | ./node_modules/.bin/vue init . test
With the same result. And to stress this, this runs fine in CircleCI 1.0