tauri-apps / tauri-apps/plugins-workspace

shell: stdin write does not work with `bun`

Open
#2,594 2 comments 0 reactions 0 assignees View on GitHub
plugin: shell status: upstream type: bug
Dominant language
Rust
Stars
1.8k
Forks
602
Avg merge
4d 14h
Merged PRs (30d)
9

Description

- os: mac 15
- bun: 1.2.8
- tauri: latest

The app code:

```ts
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:

```ts
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.