Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Bun.spawn()
const proc = Bun.spawn(["echo", "hello"]); // 等待完成 await proc.exited;
const proc = Bun.spawn(["echo", "Hello, world!"], { cwd: "/tmp", env: { FOO: "bar" }, onExit(proc, exitCode, signalCode, error) { // 退出处理 }, });
stdout
proc.stdout
ReadableStream
const proc = Bun.spawn(["echo", "hello"]); const output = await proc.stdout.text(); output; // => "hello\n"