mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat(install): introduce PUPPETEER_CHROMIUM_REVISION (#2246)
This patch introduces PUPPETEER_CHROMIUM_REVISION environment variable to specify chromium revision to be downloaded during install step.
This commit is contained in:
parent
ebe17371b0
commit
506103556b
@ -270,6 +270,7 @@ Puppeteer looks for certain [environment variables](https://en.wikipedia.org/wik
|
||||
- `HTTP_PROXY`, `HTTPS_PROXY`, `NO_PROXY` - defines HTTP proxy settings that are used to download and run Chromium.
|
||||
- `PUPPETEER_SKIP_CHROMIUM_DOWNLOAD` - do not download bundled Chromium during installation step.
|
||||
- `PUPPETEER_DOWNLOAD_HOST` - overwrite host part of URL that is used to download Chromium
|
||||
- `PUPPETEER_CHROMIUM_REVISION` - specify a certain version of chrome you'd like puppeteer to use during the installation step.
|
||||
|
||||
### class: Puppeteer
|
||||
|
||||
|
@ -30,7 +30,7 @@ const downloadHost = process.env.PUPPETEER_DOWNLOAD_HOST || process.env.npm_conf
|
||||
const puppeteer = require('./index');
|
||||
const browserFetcher = puppeteer.createBrowserFetcher({ host: downloadHost });
|
||||
|
||||
const revision = require('./package.json').puppeteer.chromium_revision;
|
||||
const revision = process.env.PUPPETEER_CHROMIUM_REVISION || require('./package.json').puppeteer.chromium_revision;
|
||||
const revisionInfo = browserFetcher.revisionInfo(revision);
|
||||
|
||||
// Do nothing if the revision is already downloaded.
|
||||
|
Loading…
Reference in New Issue
Block a user