Skip to content

Conversation

@ckerr
Copy link
Member

@ckerr ckerr commented Oct 22, 2025

Description of Change

If either NPM_CONFIG_ELECTRON_USE_REMOTE_CHECKSUMS or ELECTRON_USE_REMOTE_CHECKSUMS are set as environment variables, then force Electron to verify with remote checksums instead of embedded ones.

Fixes #48594.

Thanks to @KinshukSS2 for reporting this and suggesting a solution.

Checklist

Release Notes

Notes: Fixed an error when checking environmental variables when using remote checksums when installing Electron via npm.

If either `npm_config_electron_use_remote_checksums` or
`electron_use_remote_checksums` are set as environment variables, then
force Electron to verify with remote checksums instead of embedded ones.

Fixes #48594.
@ckerr ckerr requested a review from a team as a code owner October 22, 2025 17:25
@ckerr ckerr added semver/patch backwards-compatible bug fixes target/37-x-y PR should also be added to the "37-x-y" branch. target/38-x-y PR should also be added to the "38-x-y" branch. target/39-x-y PR should also be added to the "39-x-y" branch. labels Oct 22, 2025
@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Oct 22, 2025
Copy link
Member

@nikwen nikwen left a comment

Choose a reason for hiding this comment

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

Thanks, Charles!

force: process.env.force_no_cache === 'true',
cacheRoot: process.env.electron_config_cache,
checksums: process.env.electron_use_remote_checksums ?? process.env.npm_config_electron_use_remote_checksums ? undefined : require('./checksums.json'),
checksums: (process.env.electron_use_remote_checksums || process.env.npm_config_electron_use_remote_checksums) ? undefined : require('./checksums.json'),
Copy link
Member

Choose a reason for hiding this comment

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

Just noting that this is a behavior change for rare cases where electron_use_remote_checksums is false and npm_config_electron_use_remote_checksums is true (if that is even possible). Should be fine though because that's unlikely.

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Oct 23, 2025
@codebytere codebytere merged commit a611881 into main Oct 27, 2025
70 checks passed
@codebytere codebytere deleted the fix/checksums-env-var-handling-in-npm-install branch October 27, 2025 10:23
@release-clerk
Copy link

release-clerk bot commented Oct 27, 2025

Release Notes Persisted

Fixed an error when checking environmental variables when using remote checksums when installing Electron via npm.

@trop
Copy link
Contributor

trop bot commented Oct 27, 2025

I have automatically backported this PR to "37-x-y", please check out #48671

@trop
Copy link
Contributor

trop bot commented Oct 27, 2025

I have automatically backported this PR to "38-x-y", please check out #48672

@trop
Copy link
Contributor

trop bot commented Oct 27, 2025

I have automatically backported this PR to "39-x-y", please check out #48673

@trop trop bot added in-flight/38-x-y in-flight/39-x-y and removed target/37-x-y PR should also be added to the "37-x-y" branch. target/38-x-y PR should also be added to the "38-x-y" branch. target/39-x-y PR should also be added to the "39-x-y" branch. in-flight/39-x-y labels Oct 27, 2025
@trop trop bot added merged/39-x-y PR was merged to the "39-x-y" branch. merged/37-x-y PR was merged to the "37-x-y" branch. merged/38-x-y PR was merged to the "38-x-y" branch. and removed in-flight/37-x-y in-flight/38-x-y labels Oct 27, 2025
TheCommieAxolotl pushed a commit to TheCommieAxolotl/electron that referenced this pull request Nov 2, 2025
If either `npm_config_electron_use_remote_checksums` or
`electron_use_remote_checksums` are set as environment variables, then
force Electron to verify with remote checksums instead of embedded ones.

Fixes electron#48594.
nilayarya pushed a commit to nilayarya/electron that referenced this pull request Nov 21, 2025
If either `npm_config_electron_use_remote_checksums` or
`electron_use_remote_checksums` are set as environment variables, then
force Electron to verify with remote checksums instead of embedded ones.

Fixes electron#48594.
nilayarya added a commit to nilayarya/electron that referenced this pull request Nov 21, 2025
If either `npm_config_electron_use_remote_checksums` or
`electron_use_remote_checksums` are set as environment variables, then
force Electron to verify with remote checksums instead of embedded ones.

Fixes electron#48594.
nilayarya added a commit to nilayarya/electron that referenced this pull request Nov 21, 2025
If either `npm_config_electron_use_remote_checksums` or
`electron_use_remote_checksums` are set as environment variables, then
force Electron to verify with remote checksums instead of embedded ones.

Fixes electron#48594.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged/37-x-y PR was merged to the "37-x-y" branch. merged/38-x-y PR was merged to the "38-x-y" branch. merged/39-x-y PR was merged to the "39-x-y" branch. semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix logical bug in checksums environment variable handling in npm/install.js

6 participants