From b4f5ea1167a60c870194c70d22f5372ada5b7c4c Mon Sep 17 00:00:00 2001 From: Alex Rudenko Date: Tue, 6 Sep 2022 14:26:05 +0200 Subject: [PATCH] fix: don't detect project root for puppeteer-core (#8907) Closes #8896 --- src/initializePuppeteer.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/initializePuppeteer.ts b/src/initializePuppeteer.ts index fb0f2565..8d1e9a51 100644 --- a/src/initializePuppeteer.ts +++ b/src/initializePuppeteer.ts @@ -25,7 +25,6 @@ import {getPackageDirectory} from './util/getPackageDirectory.js'; */ export const initializePuppeteer = (packageName: string): PuppeteerNode => { const isPuppeteerCore = packageName === 'puppeteer-core'; - const puppeteerRootDirectory = getPackageDirectory(rootDirname); let preferredRevision = PUPPETEER_REVISIONS.chromium; // puppeteer-core ignores environment variables const productName = !isPuppeteerCore @@ -39,7 +38,7 @@ export const initializePuppeteer = (packageName: string): PuppeteerNode => { } return new PuppeteerNode({ - projectRoot: puppeteerRootDirectory, + projectRoot: isPuppeteerCore ? undefined : getPackageDirectory(rootDirname), preferredRevision, isPuppeteerCore, productName,