diff --git a/ts/tswatch.classes.watcher.ts b/ts/tswatch.classes.watcher.ts index 1c4a111..1f18fda 100644 --- a/ts/tswatch.classes.watcher.ts +++ b/ts/tswatch.classes.watcher.ts @@ -90,7 +90,7 @@ export class Watcher { */ public async stop() { await this.smartchokWatcher.stop(); - if (this.currentExecution) { + if (!this.currentExecution.childProcess.killed) { process.kill(-this.currentExecution.childProcess.pid); } }