Skip to content

Commit

Permalink
fix Windows killByName
Browse files Browse the repository at this point in the history
  • Loading branch information
xianyunleo committed Feb 1, 2024
1 parent 8c9e35e commit 383e48e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/utils/ProcessExtend.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default class ProcessExtend {
try {
if (isWindows) {
//taskkill杀不存在的进程会有标准错误,从而引发异常
await Command.exec(`taskkill /f /t /im ${name}`);
await Command.exec(`taskkill /f /t /im ${name}.exe`);
} else {
//pkill杀不存在的进程会有标准错误,从而引发异常
await Command.sudoExec(`pkill ${name}`);
Expand Down

0 comments on commit 383e48e

Please sign in to comment.