mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
parent
6e7c6368d3
commit
b4f5ea1167
@ -25,7 +25,6 @@ import {getPackageDirectory} from './util/getPackageDirectory.js';
|
|||||||
*/
|
*/
|
||||||
export const initializePuppeteer = (packageName: string): PuppeteerNode => {
|
export const initializePuppeteer = (packageName: string): PuppeteerNode => {
|
||||||
const isPuppeteerCore = packageName === 'puppeteer-core';
|
const isPuppeteerCore = packageName === 'puppeteer-core';
|
||||||
const puppeteerRootDirectory = getPackageDirectory(rootDirname);
|
|
||||||
let preferredRevision = PUPPETEER_REVISIONS.chromium;
|
let preferredRevision = PUPPETEER_REVISIONS.chromium;
|
||||||
// puppeteer-core ignores environment variables
|
// puppeteer-core ignores environment variables
|
||||||
const productName = !isPuppeteerCore
|
const productName = !isPuppeteerCore
|
||||||
@ -39,7 +38,7 @@ export const initializePuppeteer = (packageName: string): PuppeteerNode => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new PuppeteerNode({
|
return new PuppeteerNode({
|
||||||
projectRoot: puppeteerRootDirectory,
|
projectRoot: isPuppeteerCore ? undefined : getPackageDirectory(rootDirname),
|
||||||
preferredRevision,
|
preferredRevision,
|
||||||
isPuppeteerCore,
|
isPuppeteerCore,
|
||||||
productName,
|
productName,
|
||||||
|
Loading…
Reference in New Issue
Block a user