Skip to content

Sdtout is empty if using another shell #1117

@gigaga

Description

@gigaga

Node version : v16.13.1
OS : Windows 10

By using native shell (CMD under Windows)

const child = shell.exec(
      'ls'
    )
console.log(child.stdout)

We are able to get stdout.

However, if we specify another shell (git-bash for me)

const child = shell.exec(
      'ls',
      { shell: bashPath, windowsHide: true }
    )
console.log(child.stdout)

In this case, stdout is empty :(

Reagrds,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions