Skip to content

Commit

Permalink
feat(install): introduce PUPPETEER_CHROMIUM_REVISION (#2246)
Browse files Browse the repository at this point in the history
This patch introduces PUPPETEER_CHROMIUM_REVISION environment variable
to specify chromium revision to be downloaded during install step.
  • Loading branch information
Glennvd authored and aslushnikov committed Mar 29, 2018
1 parent ebe1737 commit 5061035
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/api.md
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion install.js
Expand Up @@ -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.
Expand Down

0 comments on commit 5061035

Please sign in to comment.