Skip to content

Commit

Permalink
fix: don't detect project root for puppeteer-core (#8907)
Browse files Browse the repository at this point in the history
Closes #8896
  • Loading branch information
OrKoN committed Sep 6, 2022
1 parent 6e7c636 commit b4f5ea1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/initializePuppeteer.ts
Expand Up @@ -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
Expand All @@ -39,7 +38,7 @@ export const initializePuppeteer = (packageName: string): PuppeteerNode => {
}

return new PuppeteerNode({
projectRoot: puppeteerRootDirectory,
projectRoot: isPuppeteerCore ? undefined : getPackageDirectory(rootDirname),
preferredRevision,
isPuppeteerCore,
productName,
Expand Down

0 comments on commit b4f5ea1

Please sign in to comment.