Skip to content

question method don't work in subprocess #1050

@turnerguo

Description

@turnerguo
// main.mjs

await $`zx sub.mjs`.pipe(process.stdout)
// sub.mjs
  console.log('running sub.mjs');

  const answer = await question(chalk.yellow`Your choice (y/n): `);
  console.log('answer', answer);

directly run sub.mjs can get answer from user input, but no answer from run main.mjs, any suggestions on this situation?

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