I'd like to the read the output of an async spawn in real time with bun
import { spawn } from "bun";
const { stdout } = spawn("some command");
// doesn't work with bun (works with node.js)
stdout.on('data', (chunk) => {
...
})
In the example shown on the bun website, you have to wait for the process to complete before getting the output: https://github.com/oven-sh/bun#bunspawn--spawn-a-process