@wps365/openclaw-wpsxiezuo 1.7.0 → 1.7.1-beta.0
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/bin/cli.mjs +4 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/bin/cli.mjs
CHANGED
|
@@ -195,9 +195,12 @@ function which(cmd) {
|
|
|
195
195
|
|
|
196
196
|
function runOpenclaw(args, { capture = false, silent = false } = {}) {
|
|
197
197
|
const bin = which("openclaw") || "openclaw";
|
|
198
|
+
// 如果 which() 找到了完整路径,就不需要 shell
|
|
199
|
+
// shell: true 只在 Windows 上未找到命令时才需要,但会触发 DEP0190 警告
|
|
200
|
+
const needShell = process.platform === "win32" && !which("openclaw");
|
|
198
201
|
const opts = {
|
|
199
202
|
stdio: capture ? ["ignore", "pipe", "pipe"] : silent ? "ignore" : "inherit",
|
|
200
|
-
shell:
|
|
203
|
+
shell: needShell,
|
|
201
204
|
};
|
|
202
205
|
const result = spawnSync(bin, args, opts);
|
|
203
206
|
if (capture) {
|
package/openclaw.plugin.json
CHANGED