tt-help-cli-ycl 1.4.59 → 1.4.60

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tt-help-cli-ycl",
3
- "version": "1.4.59",
3
+ "version": "1.4.60",
4
4
  "description": "TikTok user & video data scraper - extract ttSeller, verified, locationCreated from HTML source",
5
5
  "type": "module",
6
6
  "bin": {
@@ -11,13 +11,8 @@
11
11
 
12
12
  import { spawn, execSync } from "child_process";
13
13
  import { EventEmitter } from "events";
14
- import os from "os";
15
14
 
16
15
  const MAX_RESTART = 3;
17
- const SHELL =
18
- os.platform() === "win32"
19
- ? { cmd: process.env.COMSPEC || "cmd.exe", flag: "/c" }
20
- : { cmd: "sh", flag: "-c" };
21
16
 
22
17
  function getProcessStats(pid) {
23
18
  try {
@@ -65,16 +60,17 @@ export class ProcessManager extends EventEmitter {
65
60
  let child;
66
61
  const startTime = Date.now();
67
62
  try {
68
- // 有显式 args 则直接 spawn,否则用 sh -c 传递完整命令行(保留引号语义)
63
+ // 有显式 args 则直接 spawn,否则用 shell 模式传递完整命令行(跨平台兼容)
69
64
  if (args.length > 0) {
70
65
  child = spawn(command, args, {
71
66
  stdio: ["ignore", "pipe", "pipe"],
72
67
  detached: false,
73
68
  });
74
69
  } else {
75
- child = spawn(SHELL.cmd, [SHELL.flag, command], {
70
+ child = spawn(command, {
76
71
  stdio: ["ignore", "pipe", "pipe"],
77
72
  detached: false,
73
+ shell: true,
78
74
  });
79
75
  }
80
76
  } catch (e) {