-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
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 $``
$`npm init`
- 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
Metadata
Metadata
Assignees
Labels
No labels