processes started via `exec` are unable to accept input
Author: despairblueCreated Apr 12, 2016Updated Mar 8, 2025
Labelsfixhelp wantedlow priorityexec
If I try to launch npm init from a shelljs script it seems that the stdin is not passed through to that process:
require('shelljs/global')
exec('npm init')=>
exec npm init { stdio: 'inherit' }
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See `npm help json` for definitive documentation on these fields
and exactly what they do.
Use `npm install <pkg> --save` afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit.
name: (drive) foobar
Pressing enter has no effect.
Source: shelljs/shelljs