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

Re-fetch downloads if cache directory has changed #4958

Merged
merged 1 commit into from
May 14, 2020

Conversation

adam-lynch
Copy link
Contributor

Resolves #4955

Instead of busting the cache as I said in #4955, I use the environment variable content as a cache key prefix because it resolves the issue, there's less code to change, and if someone changes the environment variable back to a directory that was used before, it won't needlessly re-download items.

This promise catch wasn't the only issue. Some functions that called it were in lazy-val calls so they were caching the result. I removed the lazy-val usage making them a function that calls getBin / getBinFromUrl each time (which itself uses the promise cache anyway so I think it's fine). Maybe some variables could be renamed now but I decided to change the minimum and see what you say.

@develar develar merged commit 6827109 into electron-userland:master May 14, 2020
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.

Changing ELECTRON_BUILDER_CACHE between builds causes error
2 participants