Skip to content

Commit 8eb08b6

Browse files
add taskkill back for Windows platforms
1 parent dc36967 commit 8eb08b6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/libraries/Executor.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,17 @@ class Executor {
4242
return true
4343
}
4444

45+
if (os.platform() === 'win32') {
46+
const {error, stderr} = await this.#executeFile('taskkill', ['/pid', String(process.pid), '/t', '/f'])
47+
48+
if (!error && !stderr) {
49+
return true
50+
}
51+
52+
this.logger.error(error || stderr)
53+
return false
54+
}
55+
4556
return process.kill('SIGKILL')
4657
}
4758

0 commit comments

Comments
 (0)