Skip to content

processes started via exec are unable to accept input #424

@despairblue

Description

@despairblue

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    execIssues specific to the shell.exec() APIfixBug/defect, or a fix for such a problemhelp wantedlow priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions