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

Respond to multiple answers from command line #82

Open
Darth-Alex opened this issue Nov 18, 2020 · 0 comments
Open

Respond to multiple answers from command line #82

Darth-Alex opened this issue Nov 18, 2020 · 0 comments

Comments

@Darth-Alex
Copy link

my command line tool asks me 2 questions. both needs to be answered with yes or no.
here is my test code:

    const Coffee = coffee.Coffee;
    const response = await new Coffee({
      method: 'fork',
      cmd: path.join(__dirname, '../cli.js'),
      opt: {
        cwd: temp,
        stdout: process.stdout,
        stderr: process.stderr,
        stdin: process.stdin
      }
    })
      .debug(0)
      .waitForPrompt()
      .writeKey('n', 'ENTER')
      .writeKey('n', 'ENTER')
      .expect('code', 0)
      .end();

the first question is correctly answered. But the second questions not. The Command line tool is now hanging on that second question.

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

No branches or pull requests

1 participant