Skip to content

Commit bf1191c

Browse files
committed
Further update/remove packages and code references
1 parent a479a67 commit bf1191c

5 files changed

Lines changed: 42 additions & 47 deletions

File tree

out/execute.js

Lines changed: 9 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

out/execute.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 19 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -515,17 +515,16 @@
515515
"watch": "tsc -watch -p ./"
516516
},
517517
"dependencies": {
518-
"eslint": "^9.237.0",
518+
"eslint": "^9.37.0",
519519
"find-process": "^1.4.10",
520520
"minimist": "^1.2.8",
521-
"open": "^10.2.0",
522-
"tree-kill": "^1.2.2"
521+
"open": "^10.2.0"
523522
},
524523
"devDependencies": {
525524
"@types/mocha": "^10.0.10",
526525
"@types/node": "^24.7.2",
527526
"@types/vscode": "^1.103.2",
528-
"diff": "^5.2.0",
527+
"diff": "^8.0.2",
529528
"typescript": "^5.9.3"
530529
}
531530
}

src/execute.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
"use strict";
2-
import * as vscode from 'vscode';
32
import * as application from './application';
4-
import { kill } from "process";
3+
import find = require("find-process");
54
const cp = require("child_process");
6-
const find = require("find-process");
5+
76

87
export async function KillProcessByNameAsync(name:string): Promise<void> {
98
// Need to lowercase name
@@ -27,11 +26,14 @@ export function KillProcessById(pid:any): void {
2726

2827
// Process
2928
try {
30-
// Try and kill any child process
31-
let kill = require('tree-kill');
32-
kill(pid);
33-
} catch (error) {
34-
console.log(`Failed to kill process ${pid}`);
29+
process.kill(pid,"SIGKILL"); // force
30+
console.log(`Process ${pid} terminated.`);
31+
} catch (error: unknown) {
32+
if (error instanceof Error) {
33+
console.log(`Failed to kill process ${pid}`);
34+
} else {
35+
console.log(`Unknow error occurred while killing process ${pid}`);
36+
}
3537
}
3638
}
3739

0 commit comments

Comments
 (0)