-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Skip download #606
Conversation
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chromium
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
There was a problem hiding this comment.
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']) { |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chromium
There was a problem hiding this comment.
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.');
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
83d3200
to
ae3205d
Compare
Still related to this, I am new and it take couple of minutes to figure out how to set |
@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. |
@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 |
@brutalcrozt I still can't figure out how to do it. Can i ask for your help ? |
This patch starts skipping chromium download when PUPPETEER_SKIP_CHROMIUM_DOWNLOAD env variable is set.