peakroute 0.5.5 → 0.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +6 -6
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
import chalk from "chalk";
|
|
31
31
|
import * as fs2 from "fs";
|
|
32
32
|
import * as path2 from "path";
|
|
33
|
-
import { spawn, spawnSync
|
|
33
|
+
import { spawn, spawnSync } from "child_process";
|
|
34
34
|
|
|
35
35
|
// src/certs.ts
|
|
36
36
|
import * as fs from "fs";
|
|
@@ -437,10 +437,10 @@ var EXIT_TIMEOUT_MS = 2e3;
|
|
|
437
437
|
var SUDO_SPAWN_TIMEOUT_MS = 3e4;
|
|
438
438
|
function killProcess(pid, force = false) {
|
|
439
439
|
if (IS_WINDOWS) {
|
|
440
|
-
const args =
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
440
|
+
const args = ["/F", "/T", "/PID", pid.toString()];
|
|
441
|
+
const result = spawnSync("taskkill", args, { windowsHide: true, stdio: "pipe" });
|
|
442
|
+
if (result.status !== 0 && result.status !== 128) {
|
|
443
|
+
throw new Error(`taskkill failed with exit code ${result.status}`);
|
|
444
444
|
}
|
|
445
445
|
} else {
|
|
446
446
|
try {
|
|
@@ -898,7 +898,7 @@ ${chalk.bold("Skip peakroute:")}
|
|
|
898
898
|
process.exit(0);
|
|
899
899
|
}
|
|
900
900
|
if (args[0] === "--version" || args[0] === "-v") {
|
|
901
|
-
console.log("0.5.
|
|
901
|
+
console.log("0.5.6");
|
|
902
902
|
process.exit(0);
|
|
903
903
|
}
|
|
904
904
|
if (args[0] === "trust") {
|