13import { createHash, randomUUID } from "node:crypto";
14import { spawnSync } from "node:child_process";
15import { mkdirSync, mkdtempSync, readFileSync, writeFileSync, existsSync, renameSync, rmSync, realpathSync } from "node:fs";
⋯
50const bytes = await readDownload(response, onProgress);
51if (createHash(algorithm).update(bytes).digest(algorithm === "sha512" ? "base64" : "hex") !== digest) throw new Error("runtime archive checksum mismatch");
52writeFileSync(path, bytes);
⋯
55const result = spawnSync(executable, args, { encoding: "utf8", windowsHide: true });
56if (result.error || result.status !== 0) throw new Error(`runtime preparation failed: ${result.error?.message ?? result.stderr.tr