Skip to content

Respond to multiple answers from command line #82

@Darth-Alex

Description

@Darth-Alex

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions