Repository navigation
feat: allow path override with --ignore-scripts - #25377
Merged
Merged
Conversation
|
💖 Thanks for opening this pull request! 💖 We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix. Examples of commit messages with semantic prefixes:
Things that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
Fercafig
approved these changes
Oct 8, 2020
zcbenz
reviewed
Oct 26, 2020
If you --ignore-scripts when installing electron currently, it'll fail to write the path.txt file and thus fail to use the override dist path. Open to other solutions - just hoping to be able to use a prebuilt electron binary with the default package without having to muck around with it installing an unused version.
zcbenz
approved these changes
Nov 2, 2020
Contributor
Author
|
|
codebytere
approved these changes
Nov 23, 2020
MarshallOfSound
approved these changes
Nov 23, 2020
|
Congrats on merging your first pull request! 🎉🎉🎉 |
|
No Release Notes |
rezacr588
added a commit
to rezacr588/electron
that referenced
this pull request
Oct 27, 2026
npm/index.js joins ELECTRON_OVERRIDE_DIST_PATH with the executable path listed in path.txt, and falls back to a bare "electron" when there is no path.txt (added in electron#25377 for installs that skip scripts). That is only the right file name on Linux. The executable is Electron.app/Contents/MacOS/Electron on macOS and electron.exe on Windows. Since electron#49328 removed the postinstall script, path.txt does not exist until the binary is first downloaded, so a fresh install with the override set always hits that fallback. The override also skips the download, so require('electron') and the electron command kept pointing at a file that does not exist. Fall back to the executable path of the current platform instead, and add a spec for how npm/index.js resolves the executable path. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
5 tasks done
MarshallOfSound
pushed a commit
that referenced
this pull request
Nov 10, 2026
npm/index.js joins ELECTRON_OVERRIDE_DIST_PATH with the executable path listed in path.txt, and falls back to a bare "electron" when there is no path.txt (added in #25377 for installs that skip scripts). That is only the right file name on Linux. The executable is Electron.app/Contents/MacOS/Electron on macOS and electron.exe on Windows. Since #49328 removed the postinstall script, path.txt does not exist until the binary is first downloaded, so a fresh install with the override set always hits that fallback. The override also skips the download, so require('electron') and the electron command kept pointing at a file that does not exist. Fall back to the executable path of the current platform instead, and add a spec for how npm/index.js resolves the executable path. Co-authored-by: Claude Sonnet 5.5 <[email protected]>
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.
If you --ignore-scripts when installing electron currently, it'll fail to write the path.txt file and thus fail to use the override dist path. Open to other solutions - just hoping to be able to use a prebuilt electron binary with the default package without having to muck around with it installing an unused version.
Description of Change
Default to
electronif theELECTRON_OVERRIDE_DIST_PATHenvironment variable is present.Checklist
npm testpassesRelease Notes
Notes: none