Repository navigation
feat: allow setting dist URL via ELECTRON_REBUILD_DIST_URL env var - #1287
Merged
Merged
Conversation
Fall back to the ELECTRON_REBUILD_DIST_URL environment variable when the --dist-url flag is not provided. This makes it easier to configure a custom header/dist URL in packaging and CI contexts (mirrors, proxies, AUR build scripts) where threading a CLI flag through is awkward. The --dist-url flag takes precedence when both are set. Closes #301
MarshallOfSound
approved these changes
Jun 29, 2026
MarshallOfSound
marked this pull request as ready for review
June 29, 2026 19:52
georgexu99
approved these changes
Jul 1, 2026
|
🎉 This PR is included in version 4.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Samuel Attard · Slack thread
Before / After
--dist-urlCLI flag.ELECTRON_REBUILD_DIST_URLenvironment variable when the flag is absent. The--dist-urlflag takes precedence when both are set.How
In
src/cli.ts, theheaderURLpassed torebuild()now falls back to the env var:argv['dist-url'] || process.env.ELECTRON_REBUILD_DIST_URL. The--dist-urloption description and the README options note were updated to mention the equivalent environment variable.Why
This makes it easier to configure a custom header/dist URL in packaging and CI contexts — mirrors, proxies, AUR build scripts — where threading a CLI flag all the way through to
electron-rebuildis awkward.Closes #301 (#301)
Generated by Claude Code