Skip to content

Commit 33d31d6

Browse files
committed
fix: ensure puppeteer install command can run
Fixes that the install command might fail if the current project doesn't depend on Puppeteer.
1 parent b137b6e commit 33d31d6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

runner/orchestration/generate.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,8 @@ async function installChrome(): Promise<void> {
664664
if (!chromeInstallPromise) {
665665
chromeInstallPromise = executeCommand(
666666
'npx puppeteer browsers install chrome',
667-
process.cwd()
667+
// The command needs to run in a directory whose closest node_modules contain `puppeteer`.
668+
import.meta.dirname
668669
);
669670
}
670671

0 commit comments

Comments
 (0)