mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
17 lines
394 B
TypeScript
17 lines
394 B
TypeScript
import { spawn } from "bun";
|
|
import { bunEnv, bunExe } from "harness";
|
|
import { join } from "node:path";
|
|
|
|
// prior, this would hang on Windows if you ran this with a pipe
|
|
|
|
const run = spawn({
|
|
cmd: [bunExe(), "--watch", join(import.meta.dirname, "empty.js")],
|
|
stdout: "inherit",
|
|
stderr: "inherit",
|
|
stdin: "ignore",
|
|
env: bunEnv,
|
|
});
|
|
await Bun.sleep(250);
|
|
run.kill(9);
|
|
await run.exited;
|