Visitar URL original
Sdtout is empty if using another shell · Issue #1117 · shelljs/shelljs · GitHub
Skip to content

Sdtout is empty if using another shell #1117

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,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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