diff --git a/docs/.vitepress/theme/custom.css b/docs/.vitepress/theme/custom.css index 138c20b95e..7298b281ee 100644 --- a/docs/.vitepress/theme/custom.css +++ b/docs/.vitepress/theme/custom.css @@ -3,7 +3,6 @@ --vp-c-green-2: #34d399; --vp-c-green-3: #6ee7b7; --vp-c-green-soft: rgba(16, 185, 129, 0.14); - } .dark { diff --git a/packages/compas/src/main/development/integrations/actions.js b/packages/compas/src/main/development/integrations/actions.js index 16e7019c1f..cbb7cf7b1c 100644 --- a/packages/compas/src/main/development/integrations/actions.js +++ b/packages/compas/src/main/development/integrations/actions.js @@ -27,11 +27,19 @@ export class ActionsIntegration extends BaseIntegration { * command: string[], * workingDirectory: string, * startTime: number, - * boundResetState: () => void, * }} */ this.activeProcess = undefined; + const exitHandler = () => { + if (this.activeProcess?.cp) { + // @ts-expect-error + process.kill(this.activeProcess.cp.pid); + } + }; + + process.once("exit", exitHandler); + this.setActionsGroups(); if (this.state.screen.state === "idle") { @@ -201,12 +209,11 @@ export class ActionsIntegration extends BaseIntegration { cwd: action.workingDirectory, stdio: ["ignore", "inherit", "inherit"], }), - boundResetState: this.resetState.bind(this), }; // Separate listeners for screen reset and user information this.activeProcess.cp.once("exit", this.onActionExit.bind(this)); - this.activeProcess.cp.once("exit", this.activeProcess.boundResetState); + this.activeProcess.cp.once("exit", this.resetState.bind(this)); } async killAction() {