diff --git a/docs/api.md b/docs/api.md index 609f22f5..9b767d28 100644 --- a/docs/api.md +++ b/docs/api.md @@ -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 diff --git a/install.js b/install.js index 49541079..44f75310 100644 --- a/install.js +++ b/install.js @@ -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.