(cwd: string, command: string[])
| 35 | }) |
| 36 | |
| 37 | const exec = (cwd: string, command: string[]) => |
| 38 | Effect.promise(async () => { |
| 39 | const proc = Bun.spawn(command, { cwd, stdout: "ignore", stderr: "pipe" }) |
| 40 | const code = await proc.exited |
| 41 | if (code !== 0) throw new Error(`${command.join(" ")} failed: ${await new Response(proc.stderr).text()}`) |
| 42 | }) |
| 43 | |
| 44 | const write = (file: string, content: string | Uint8Array) => |
| 45 | FSUtil.Service.use((fs) => fs.writeWithDirs(file, content)) |
no test coverage detected