Piping `yes ""` through a node-based CLI gets stuck


#1

Hi,

Short Description

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.

Detailed Description

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

Any ideas?


#3

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.