fix(desktop): ensure Electron binary before predev via install.js#26202
fix(desktop): ensure Electron binary before predev via install.js#26202JackLuguibin wants to merge 1 commit into
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #26204
Type of change
What does this PR do?
Before
predevruns, we check whether the Electron OS binary was downloaded by looking forpath.txtunderpackages/desktop/node_modules/electron(that file is created after a successfulinstall.js/ postinstall). If it is missing—e.g. fresh clone, installs with scripts skipped, or a broken partial install—we runnode install.jsin that directory to fetch the platform binary, then continue with the existingcopy-iconsandbuild-nodesteps. That waypredevfails less often with “no Electron binary” errors buried in later commands.How did you verify your code works?
Remove or temporarily delete
node_modules/electron/path.txtunderpackages/desktop, run whatever invokespredev, and confirm the script logs the missing-binary message, runsinstall.js, recreatespath.txt, and completes the rest of predev. On a machine where Electron is already installed correctly, confirm the install path is skipped becausepath.txtexists.Screenshots / recordings
N/A (not a UI change).
Checklist