electron / get

Download Electron release artifacts
https://npm.im/@electron/get
MIT License
338 stars 106 forks source link

fix: validate checksum of cached artifacts #212

Closed MarshallOfSound closed 1 year ago

MarshallOfSound commented 2 years ago

Fixes #210

continuous-auth[bot] commented 1 year ago

:tada: This PR is included in version 2.0.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

kanru commented 1 year ago

The new behavior seems to be always trying to download the checksum file even if all other files are cached. I'm unable to build electron apps in a sandboxed builder (without network) due to this. Could you let me know if I need to cache everything where should I put the SHASUMS256.txt file?

MarshallOfSound commented 1 year ago

The new behavior seems to be always trying to download the checksum file even if all other files are cached.

This is the new correct/expected behavior.

Could you let me know if I need to cache everything where should I put the SHASUMS256.txt file?

Right next to the other files you were pre-filling the cache with

Worth noting that if you want to do this truly offline without prefilling the SHASUM file you could also provide a checksums object directly to @electron/get. This is for instance what the core electron npm package does --> https://github.com/electron/electron/blob/main/npm/install.js#L45