electron / chromedriver

Download ChromeDriver for Electron

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Specify ELECTRON_MIRROR to a directory/or file on disk

CMCDragonkai opened this issue · comments

Our build system is reproducible so it does not allow any network access. Is there a way to specify that the installation should just a prespecified file that's on disk or a directory? Similar to the electronZipDir used by @electron-forge/cli?

maybe populate ~/.cache/electron/ as described in https://github.com/electron/get#how-it-works

the url is in chromedriver/node_modules/@electron/get/dist/cjs/index.js line 46
just add this after line 48

console.dir({ url, cachePath: cache.getCachePath(url, fileName) }); process.exit();

for example

{
  url: 'https://github.com/electron/electron/releases/download/v14.0.0/chromedriver-v14.0.0-linux-x64.zip',
  cachePath: '/home/user/.cache/electron/385ab57c1ff3ee205462577b7d7844ec5661943eda4db02aad16cb90456aab69/chromedriver-v14.0.0-linux-x64.zip'
}

Closing in agreement with above.