import { spawn } from "node:child_process";

await import("./runtime-seed.mjs");

const [command, ...args] = process.argv.slice(2);
if (!command) throw new Error("foundry_runtime_command_required");
const child = spawn(command, args, { stdio: "inherit" });
child.on("exit", (code, signal) => process.exitCode = code ?? (signal ? 1 : 0));
child.on("error", (error) => { throw error; });
