feat: consolidate agent execution stack
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { spawn } from "node:child_process";
|
||||
|
||||
import { getEnginePath } from "@rivetkit/engine-cli";
|
||||
|
||||
const enginePath = getEnginePath();
|
||||
const proc = spawn(enginePath, ["start"], { stdio: "inherit" });
|
||||
|
||||
process.on("SIGINT", () => proc.kill("SIGINT"));
|
||||
process.on("SIGTERM", () => proc.kill("SIGTERM"));
|
||||
|
||||
proc.on("exit", (code) => {
|
||||
process.exit(code ?? 0);
|
||||
});
|
||||
Reference in New Issue
Block a user