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

[Bug]: configuration.skipDownload should factor in whether the configuration.executablePath is set in the evironment. #9419

Closed
EvanCarroll opened this issue Dec 15, 2022 · 2 comments · Fixed by #9466

Comments

@EvanCarroll
Copy link
Contributor

EvanCarroll commented Dec 15, 2022

Bug description

Currently if the user is providing the binary location of Chromium, the user must also say not to download chrome through a different environmental variable.

  configuration.skipDownload = Boolean(
    process.env['PUPPETEER_SKIP_DOWNLOAD'] ??
      process.env['npm_config_puppeteer_skip_download'] ??
      process.env['npm_package_config_puppeteer_skip_download'] ??
      process.env['PUPPETEER_SKIP_CHROMIUM_DOWNLOAD'] ??
      process.env['npm_config_puppeteer_skip_chromium_download'] ??
      process.env['npm_package_config_puppeteer_skip_chromium_download'] ??
      configuration.skipDownload
  );

https://github.com/puppeteer/puppeteer/blob/4bf338b26d6cceae2dc718074ed9839e905905f2/packages/puppeteer/src/getConfiguration.ts

In my opinion PUPPETEER_SKIP_CHROMIUM_DOWNLOAD should default to on if configuration.executablePath is set with any of those environmental variables. Why would you ever want to download Chrome if the user is telling you to source on the system a specific pre-installed copy of Chrome?

Puppeteer version

current

Node.js version

current

npm version

current

What operating system are you seeing the problem on?

Linux

Configuration file

No response

Relevant log output

No response

@EvanCarroll EvanCarroll changed the title [Bug]: SKIP_DOWNLOAD should factor in whether the BIN is set. [Bug]: SKIP_DOWNLOAD should factor in whether the PUPPETEER_SKIP_CHROMIUM_DOWNLOAD is set. Dec 15, 2022
@EvanCarroll EvanCarroll changed the title [Bug]: SKIP_DOWNLOAD should factor in whether the PUPPETEER_SKIP_CHROMIUM_DOWNLOAD is set. [Bug]: configuration.skipDownload should factor in whether the configuration.executablePath is set in the evironment. Dec 15, 2022
@jrandolf
Copy link
Contributor

Sounds reasonable! Would you like to submit a PR?

@EvanCarroll
Copy link
Contributor Author

EvanCarroll commented Dec 19, 2022

Sure. On the way.

@jrandolf done.

EvanCarroll added a commit to EvanCarroll/puppeteer that referenced this issue Dec 19, 2022
EvanCarroll added a commit to EvanCarroll/puppeteer that referenced this issue Dec 19, 2022
EvanCarroll added a commit to EvanCarroll/puppeteer that referenced this issue Dec 19, 2022
EvanCarroll added a commit to EvanCarroll/puppeteer that referenced this issue Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants