Skip to content

yarn run fails when stdin is redirected #5295

@agross

Description

@agross

What is the current behavior?

Reproduction repo here: https://github.com/agross/yarn-run-windows

The repro runs a CLI installed by yarn with stdin redirected. Whenever I run this from msysgit/Git for Windows, it fails reading from stdin.

Example: echo 'h1{some:thing;}' | yarn run autoprefixer-cli

(npx works)

If the current behavior is a bug, please provide the steps to reproduce.

$ ./repro.sh
yarn run v1.3.2
$ D:\Users\agross\Downloads\yarn-run-windows\node_modules\.bin\autoprefixer-cli
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: read EBADF
    at _errnoException (util.js:1022:11)
    at Pipe.onread (net.js:615:25)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

What is the expected behavior?
Same as on e.g. macOS:

$ ./repro.sh
yarn run v1.3.2
$ /Users/agross/Downloads/yarn-run-windows/node_modules/.bin/autoprefixer-cli
h1{some:thing;}
✨  Done in 0.80s.

Please mention your node.js, yarn and operating system version.

node 8.9.4
yarn 1.3.2
Windows 10 x64

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions