(cmd: string[], cwd: string)
| 48 | const workDir = path.join(packageRoot, ".fonts-work"); |
| 49 | |
| 50 | const run = async (cmd: string[], cwd: string): Promise<void> => { |
| 51 | const proc = Bun.spawn(cmd, { cwd, stdout: "inherit", stderr: "inherit" }); |
| 52 | const code = await proc.exited; |
| 53 | if (code !== 0) { |
| 54 | // oxlint-disable-next-line executor/no-try-catch-or-throw, executor/no-error-constructor -- boundary: a build script reports failure by exiting non-zero |
| 55 | throw new Error(`${cmd.join(" ")} exited ${code}`); |
| 56 | } |
| 57 | }; |
| 58 | |
| 59 | await rm(workDir, { recursive: true, force: true }); |
| 60 | await mkdir(workDir, { recursive: true }); |
no outgoing calls
no test coverage detected