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

fix: Allow PUPPETEER_EXECUTABLE_PATH to be set in npmrc and package.json #4270

Merged
merged 1 commit into from Apr 11, 2019
Merged

Conversation

travis-w
Copy link
Contributor

Hello,

This PR sets fixes the PUPPETEER_EXECUTABLE_PATH environment variable so that it can be set in the .npmrc or package.json like the documentation says. Other env variables are set up this way, this one just seems to have been missed.

@aslushnikov
Copy link
Contributor

@travis-w the npm_config_ env variables are exposed only in install scripts. Install scripts don't run puppeteer's launch - why do you need this?

@travis-w
Copy link
Contributor Author

@aslushnikov I believe they are exposed in all npm scripts. So anytime someone starts a program that uses puppeteer via an npm run command, these will be exposed.

We have a project where we have to point to a local chrome executable for puppeteer (because of a corporate proxy), so whenever the project is run, the PUPPETEER_EXECUTABLE_PATH needs to be set. It can be easier/cleaner to set these config variables in the .npmrc or package.json.

Plus in the documentation, it says:

If Puppeteer doesn't find them in the environment during the installation step, a lowercased variant of these variables will be used from the npm config.

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.

None yet

2 participants