Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

execSync and spawnSync do not return stdout if stdout is not 'pipe' #9265

@summer4096

Description

@summer4096
var c = require('child_process');

c.execSync('ls').toString(); //returns stdout
c.execSync('ls', {stdio: [0, 1, 2]}).toString(); //returns null

I want to run a command with the parent process' stdout+stderr while also capturing both.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions