Skip to content

bun: use inherit stdio cause error ERR_STREAM_CANNOT_PIPE #940

@gutenye

Description

@gutenye

Reproduce

// a.js
import { $ } from 'zx'
$({ stdio: 'inherit' })`ls`

Run it with bun a.js

Output error

461 |         ;(_b = child.stdout) == null ? void 0 : _b.on("data", (d) => {
462 |           c.store.stdout.push(d);
463 |           c.store.stdall.push(d);
464 |           c.ee.emit("stdout", d, c);
465 |         }).pipe(c.stdout);
                 ^
error: Cannot pipe, not readable
 code: "ERR_STREAM_CANNOT_PIPE"

Error comes from here

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