goosetools-worker 0.1.1 → 0.1.2
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 +1 -1
- package/worker/cli.js +7 -2
package/package.json
CHANGED
package/worker/cli.js
CHANGED
|
@@ -44,9 +44,12 @@ try {
|
|
|
44
44
|
"cli.js",
|
|
45
45
|
);
|
|
46
46
|
if (existsSync(playwrightCli)) {
|
|
47
|
+
// Quiet on success — playwright's CLI prints a misleading "run npm
|
|
48
|
+
// install first" box in the npx cache layout. Its output is only shown
|
|
49
|
+
// (via the catch below) when the install genuinely fails.
|
|
47
50
|
execFileSync(process.execPath, [playwrightCli, "install", "chromium"], {
|
|
48
51
|
cwd: ROOT,
|
|
49
|
-
stdio: ["ignore", "pipe", "
|
|
52
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
50
53
|
});
|
|
51
54
|
} else {
|
|
52
55
|
execFileSync("npx", ["--yes", "playwright", "install", "chromium"], {
|
|
@@ -55,7 +58,9 @@ try {
|
|
|
55
58
|
shell: process.platform === "win32",
|
|
56
59
|
});
|
|
57
60
|
}
|
|
58
|
-
} catch {
|
|
61
|
+
} catch (err) {
|
|
62
|
+
const detail = err?.stderr?.toString().trim();
|
|
63
|
+
if (detail) console.error(detail);
|
|
59
64
|
console.error("Couldn't install the rendering browser — check your internet connection and retry.");
|
|
60
65
|
process.exit(1);
|
|
61
66
|
}
|