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

feat: allow overwrite the path for the downloads folder #5105

Closed
wants to merge 1 commit into from

Conversation

fengmk2
Copy link

@fengmk2 fengmk2 commented Oct 31, 2019

e.g.:

PUPPETEER_DOWNLOAD_PATH=/store/chromiums npm install

e.g.:

```bash
PUPPETEER_DOWNLOAD_PATH=/store/chromiums npm install
```
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@fengmk2
Copy link
Author

fengmk2 commented Nov 6, 2019

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes and removed cla: no labels Nov 6, 2019
@lcabral37
Copy link
Contributor

I'm guessing this PR is dead in the water?
Anyhow an advice, it would be nice to share the PUPPETEER_DOWNLOAD_PATH to the launcher as well as to not having to keep track of it via the PUPPETEER_DOWNLOAD_PATH.
something like (you should take in consideration that you might not want to expose this to puppeteer-core):

@@ -743,11 +743,15 @@ function resolveExecutablePath(
   }
   const browserFetcher = new BrowserFetcher(launcher._projectRoot, {
     product: launcher.product,
+    path: process.env.PUPPETEER_DOWNLOAD_PATH ||
+      process.env.npm_config_puppeteer_download_path ||
+      process.env.npm_package_config_puppeteer_download_path,
   });
   if (!launcher._isPuppeteerCore && launcher.product === 'chrome') {

Independently of this PR turns out, great work

Copy link
Contributor

@jschfflr jschfflr left a comment

Choose a reason for hiding this comment

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

@fengmk2 Thanks for your contribution! Could you verify it's still relevant and update it to resolve the merge conflicts? Happy to get this landed :)

@jschfflr
Copy link
Contributor

This functionality has already landed in #6014. But thanks for your contribution anyways!

@jschfflr jschfflr closed this Sep 15, 2021
@fengmk2 fengmk2 deleted the custom-download-path branch November 8, 2021 01:33
@fengmk2
Copy link
Author

fengmk2 commented Nov 8, 2021

@jschfflr :)

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

Successfully merging this pull request may close these issues.

None yet

4 participants