Expected Behavior
When the provided command prompts for the user input, it should accept entered value after pressing Enter or Return.
Actual Behavior
It just keeps reading the entered values without respecting end-of-line input.
#!/usr/bin/env zx
$`npm init`

Steps to Reproduce the Problem
- Just pass an interactive command to the $``
- Try to fill it
This behavior could be due to not redirecting the parent process stdin to the spawned process stdin. I tried the same command with the spawn, and it worked fine.
#! /usr/bin/env node
const { spawn } = require('child_process');
spawn('npm', ['init'], { stdio: 'inherit' });
Specifications
- Version: 1.8.0
- Platform: Ubuntu 20.04.2 LTS
Expected Behavior
When the provided command prompts for the user input, it should accept entered value after pressing Enter or Return.
Actual Behavior
It just keeps reading the entered values without respecting end-of-line input.
Steps to Reproduce the Problem
This behavior could be due to not redirecting the parent process
stdinto the spawned processstdin. I tried the same command with thespawn, and it worked fine.Specifications