Use `electron_config_cache` env var to search for cached downloads
See original GitHub issueElectron docs say that one can override path to cached electron downloads via the electron_config_cache
environment variable, but it doesn’t seem to be the case with electron-get - the env var is ignored and, as far as I understand, cache path is unconditionally resolved to something like $XDG_CACHE_HOME/electron/sanitazed_url/electron.zip
:
https://github.com/electron/get/blob/f2c625377c758c8348a5432e22a5a9ac0ef98889/src/Cache.ts#L17-L22
electron-downoad
did respect electron_config_cache
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:16
Top Results From Across the Web
cmd/go: add GOMODCACHE · Issue #34527 · golang/go
Summary Add GOMODCACHE to control where the module download cache lives. Its default can continue to be GOPATH[0]/pkg/mod, and the variable ...
Read more >Cache management — datasets 1.12.0 documentation
The cache allows Datasets to avoid re-downloading or processing the entire dataset every time you use it. This guide will show you how...
Read more >How to cache downloaded PIP packages - Stack Overflow
You can use a specific environment variable PIP_DOWNLOAD_CACHE and make it point to a directory where your packages will be stored.
Read more >Environment Variable caching in Power Automate
In this blog post, I will explain the current problem with Environment Variable caching in Power Automate flows and how to work around...
Read more >Environment variables — MIT Kerberos Documentation
KRB5CCNAME: Default name for the credentials cache file, in the form type:residual. The type of the default cache may determine the availability of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The problem is this…
The
electron-packager
exposes apackager
default export. This is used byelectron-forge
in thepackages/api/core/src/api/package.ts
.Specifically where it calls
const outputPaths = await packager(packageOpts);
. Through several series of magic, it will eventually call thedownloadArtifact
function in@electron/get
.At no point is the
cacheRoot
ever acquired from an environment variable.The
packageOpts
defined inpackages/api/core/src/api/package.ts
has no mention about download options that would specify thecacheRoot
.So currently there is no way to set the
cacheRoot
via an enviroment variable in the latestelectron-forge
.EXCEPT…
through the
forge.packagerConfig
.The message above corresponds to this line: https://github.com/electron/get/blob/v1.12.4/src/index.ts#L71
We are using 1.12.4.
Which means
artifactDetails.cacheRoot
isundefined
.What could cause that to be
undefined
?