tt-help-cli-ycl 1.4.65 → 1.4.66
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
|
@@ -119,17 +119,23 @@ export class ProcessManager extends EventEmitter {
|
|
|
119
119
|
let child;
|
|
120
120
|
const startTime = Date.now();
|
|
121
121
|
try {
|
|
122
|
-
// 拆分为 program + args;Windows .cmd 需 shell
|
|
122
|
+
// 拆分为 program + args;Windows .cmd 需 shell,用完整命令行
|
|
123
123
|
if (args.length === 0) {
|
|
124
124
|
const parts = splitCommand(command);
|
|
125
125
|
command = parts[0] || command;
|
|
126
126
|
args = parts.slice(1);
|
|
127
127
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
128
|
+
const fullCmd = [command, ...args].join(" ");
|
|
129
|
+
child = IS_WIN
|
|
130
|
+
? spawn(fullCmd, {
|
|
131
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
132
|
+
detached: false,
|
|
133
|
+
shell: true,
|
|
134
|
+
})
|
|
135
|
+
: spawn(command, args, {
|
|
136
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
137
|
+
detached: false,
|
|
138
|
+
});
|
|
133
139
|
|
|
134
140
|
// Windows: cmd.exe 不是真实进程,延迟获取子进程 PID
|
|
135
141
|
if (IS_WIN) {
|