fix: 修复杀死进程报错的bug
parent
10ec91f3b0
commit
be5d04827a
|
@ -3,7 +3,7 @@ const execute = Shell.execute
|
||||||
|
|
||||||
const executor = {
|
const executor = {
|
||||||
async windows (exec, { port }) {
|
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
|
// eslint-disable-next-line no-unused-vars
|
||||||
const ret = await exec(cmds, { type: 'cmd' })
|
const ret = await exec(cmds, { type: 'cmd' })
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in New Issue