Skip to content

Commit cfd00d4

Browse files
committed
--amend
1 parent 31a879e commit cfd00d4

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "comfyui-openclaw"
33
description = "Your own personal AIGC Factory. Any picture. Any reel. The Comfy way.©️"
4-
version = "0.1.0"
4+
version = "0.1.1"
55
license = {text = "MIT"}
66
readme = "README.md"
77
requires-python = ">=3.10"

scripts/run-playwright.mjs

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,32 @@ function ensurePythonShimIfNeeded(env) {
3939
return env;
4040
}
4141

42+
function runNpmExec(args, { label }) {
43+
if (process.env.npm_execpath) {
44+
const res = spawnSync(process.execPath, [process.env.npm_execpath, 'exec', '--', ...args], {
45+
stdio: 'inherit',
46+
env,
47+
});
48+
return res;
49+
}
50+
return spawnSync('npm', ['exec', '--', ...args], { stdio: 'inherit', env });
51+
}
52+
4253
function runPlaywrightCommand(args, { label }) {
4354
if (process.platform === 'win32') {
44-
const res = spawnSync('npm', ['exec', '--', ...args], { stdio: 'inherit', env });
55+
const res = runNpmExec(args, { label });
4556
if (res.error && res.error.code === 'ENOENT') {
46-
console.error(`[OpenClaw] Failed to run ${label}: npm not found in PATH`);
57+
console.error(
58+
`[OpenClaw] Failed to run ${label}: npm not found in PATH (and npm_execpath not set)`,
59+
);
4760
process.exit(1);
4861
}
4962
return res;
5063
}
5164

5265
const res = spawnSync(getNpxCommand(), args, { stdio: 'inherit', env });
5366
if (res.error && res.error.code === 'ENOENT') {
54-
const fallback = spawnSync('npm', ['exec', '--', ...args], { stdio: 'inherit', env });
67+
const fallback = runNpmExec(args, { label });
5568
if (fallback.error) {
5669
console.error(`[OpenClaw] Failed to run ${label}:`, fallback.error);
5770
process.exit(1);

0 commit comments

Comments
 (0)