Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip download #606

Merged
merged 3 commits into from
Aug 31, 2017
Merged

Skip download #606

merged 3 commits into from
Aug 31, 2017

Conversation

aslushnikov
Copy link
Contributor

This patch starts skipping chromium download when PUPPETEER_SKIP_CHROMIUM_DOWNLOAD env variable is set.

docs/api.md Outdated

Puppeteer looks for certain environment variables to aid its operations:

- `HTTP_PROXY`, `HTTPS_PROXY`, `NO_PROXY` - defines HTTP proxy settings that are used to download and run chromium.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chromium

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

docs/api.md Outdated
Puppeteer looks for certain environment variables to aid its operations:

- `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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

install.js Outdated
@@ -14,6 +14,11 @@
* limitations under the License.
*/

if (process.env['PUPPETEER_SKIP_CHROMIUM_DOWNLOAD']) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason not to use process.env.PUPPETEER_SKIP_CHROMIUM_DOWNLOAD?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Property access with string literals is done to trick type linter and avoid the ERROR: PUPPETEER_SKIP_CHROMIUM_DOWNLOAD is never defined on process.env object. That's a habbit from devtools codebase.

Done.

install.js Outdated
@@ -14,6 +14,11 @@
* limitations under the License.
*/

if (process.env['PUPPETEER_SKIP_CHROMIUM_DOWNLOAD']) {
console.log('**WARNING** Puppeteer is skipping chromium download because environment contains "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" variable.');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chromium

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this should say "Warning". Users opt-in to it. How about:

console.log('**INFO** Skipping Chromium download. "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" environment variable was found.');

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@aslushnikov aslushnikov merged commit 9d7929c into puppeteer:master Aug 31, 2017
@sukrosono
Copy link
Contributor

Still related to this, I am new and it take couple of minutes to figure out how to set process.env . I made a small changes on the documentation like so, Guys, do you like the changes as a PR?

@aslushnikov
Copy link
Contributor Author

@brutalcrozt instead of adding this example, would you mind sending a PR that links to the wiki page in the documentation? This would help others who don't know what's an environment variable.

@sukrosono
Copy link
Contributor

@aslushnikov Yes, that was kind of response which i expected. Recently my PR are rejected because miss match the expectation, so i like to make a small comment to prevent that. 😄 , Thanks

@aslushnikov aslushnikov deleted the skip-download branch October 10, 2017 00:20
@serotonyn
Copy link

@brutalcrozt I still can't figure out how to do it. Can i ask for your help ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants