-
Notifications
You must be signed in to change notification settings - Fork 16.9k
fix: logical bug in install.js env var handling #48634
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
fix: logical bug in install.js env var handling #48634
Conversation
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.
nikwen
left a comment
There was a problem hiding this 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'), |
There was a problem hiding this comment.
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.
|
Release Notes Persisted
|
|
I have automatically backported this PR to "37-x-y", please check out #48671 |
|
I have automatically backported this PR to "38-x-y", please check out #48672 |
|
I have automatically backported this PR to "39-x-y", please check out #48673 |
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.
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.
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.
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.
Description of Change
If either
NPM_CONFIG_ELECTRON_USE_REMOTE_CHECKSUMSorELECTRON_USE_REMOTE_CHECKSUMSare 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
npm testpassesRelease Notes
Notes: Fixed an error when checking environmental variables when using remote checksums when installing Electron via npm.