MCPcopy
hub / github.com/di-sukharev/opencommit / setExitHandler

Function setExitHandler

out/cli.cjs:66562–66572  ·  view source on GitHub ↗
(spawned, { cleanup, detached }, timedPromise)

Source from the content-addressed store, hash-verified

66560 });
66561 return Promise.race([timeoutPromise, safeSpawnedPromise]);
66562};
66563var validateTimeout = ({ timeout }) => {
66564 if (timeout !== void 0 && (!Number.isFinite(timeout) || timeout < 0)) {
66565 throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`);
66566 }
66567};
66568var setExitHandler = async (spawned, { cleanup, detached }, timedPromise) => {
66569 if (!cleanup || detached) {
66570 return timedPromise;
66571 }
66572 const removeExitHandler = (0, import_signal_exit.default)(() => {
66573 spawned.kill();
66574 });
66575 return timedPromise.finally(() => {

Callers 1

execaFunction · 0.85

Calls 1

finallyMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…