Skip to content

shell: stdin write does not work with bun #2594

Open
@egoist

Description

@egoist
  • os: mac 15
  • bun: 1.2.8
  • tauri: latest

The app code:

const cmd = Command.create("bun", ["foo.ts"], {
    encoding: "utf8",
});

cmd.stdout.on("data", (data) => {
    console.log("stdout", data);
});

const child = await cmd.spawn();

await child.write("hello bun\n");

The bun script:

process.stdin.on("data", (data) => {
  console.log("you typed:", data.toString());
});

The data event on stdin is never emitted, most likely a bun bug but I'm posting here just in case.

Here is the repro: https://github.com/egoist-bot/bun-stdin-bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingplugin: shellstatus: upstreamThis issue needs to be fixed in an upstream project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions