fix: 修复杀死进程报错的bug

pull/67/head
xiaojunnuo 2021-04-04 00:28:15 +08:00
parent 10ec91f3b0
commit be5d04827a
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@ const execute = Shell.execute
const executor = {
async windows (exec, { port }) {
const cmds = [`for /f "tokens=5" %a in ('netstat -aon ^| find ":${port}" ^| find "LISTENING"') do taskkill /f /pid %a`]
const cmds = [`for /f "tokens=5" %a in ('netstat -aon ^| find ":${port}" ^| find "LISTENING"') do (taskkill /f /pid %a & exit /B) `]
// eslint-disable-next-line no-unused-vars
const ret = await exec(cmds, { type: 'cmd' })
return true