MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / shutdown

Function shutdown

e2e/scripts/cli.ts:334–344  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

332 writeState(state);
333
334 const shutdown = async () => {
335 await teardown();
336 if (state.servePorts) {
337 const ts = await findTailscale();
338 if (ts) {
339 for (const port of state.servePorts) await sh(ts, ["serve", `--https=${port}`, "off"]);
340 }
341 }
342 rmSync(statePath(target), { force: true });
343 process.exit(0);
344 };
345 process.on("SIGTERM", () => void shutdown());
346 process.on("SIGINT", () => void shutdown());
347 // Stay alive: this process owns the instance (and cloud's emulators).

Callers 1

runFunction · 0.70

Calls 4

findTailscaleFunction · 0.85
statePathFunction · 0.85
teardownFunction · 0.70
shFunction · 0.70

Tested by

no test coverage detected