-
-
Notifications
You must be signed in to change notification settings - Fork 195
Expand file tree
/
Copy pathprocessUtils-test.js
More file actions
58 lines (52 loc) · 1.87 KB
/
processUtils-test.js
File metadata and controls
58 lines (52 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
const ProcessUtils = require("./processUtils");
/*
var pid = 5064;
ProcessUtils.getChildrenOfPid(pid, function (err, children) {
console.log(children);
children.push(pid);
children.forEach(function (pid) {
ProcessUtils.killSingleProcess(pid);
});
});
*/
[
"git",
"C:\\Program Files (x86)\\Git\\cmd\\git.exe",
"C:/Program Files (x86)/Git/cmd/git.exe",
"C:/Program Files (x86)/Git/cmd/git2.exe",
"C:/Program Files (x86)/Git/cmd/",
"C:/Program Files (x86)/Git/cmd",
"C:\\Program Files (x86)\\Git\\Git Bash.vbs"
].forEach(function (path) {
ProcessUtils.executableExists(path, function (err, exists, resolvedPath) {
console.log("ProcessUtils.executableExists for: " + path);
console.log(" - exists: " + exists);
console.log(" - resolvedPath: " + resolvedPath);
});
});
/*
ProcessUtils.executableExists("git", function (err, result, resolvedPath) {
console.log("git");
console.log(result);
});
ProcessUtils.executableExists("C:\\Program Files (x86)\\Git\\cmd\\git.exe", function (err, result) {
console.log("result for C:\\Program Files (x86)\\Git\\cmd\\git.exe");
console.log(result);
});
ProcessUtils.executableExists("C:/Program Files (x86)/Git/cmd/git.exe", function (err, result) {
console.log("result for C:/Program Files (x86)/Git/cmd/git.exe");
console.log(result);
});
ProcessUtils.executableExists("C:/Program Files (x86)/Git/cmd/git2.exe", function (err, result) {
console.log("result for C:/Program Files (x86)/Git/cmd/git2.exe");
console.log(result);
});
ProcessUtils.executableExists("C:/Program Files (x86)/Git/cmd/", function (err, result) {
console.log("result for C:/Program Files (x86)/Git/cmd/");
console.log(result);
});
ProcessUtils.executableExists("C:/Program Files (x86)/Git/cmd", function (err, result) {
console.log("result for C:/Program Files (x86)/Git/cmd");
console.log(result);
});
*/