Skip to content

fix(electron): extract fallback archives with zip extractor on Linux - #525

Merged
zortos293 merged 1 commit into
devfrom
cursor/fix-electron-zip-extraction-8b98
Jun 27, 2026
Merged

fix(electron): extract fallback archives with zip extractor on Linux#525
zortos293 merged 1 commit into
devfrom
cursor/fix-electron-zip-extraction-8b98

Conversation

@zortos293

Copy link
Copy Markdown
Collaborator

Summary

Fixes the Electron archive fallback path in ensure-electron-installed.mjs when the primary installer exits successfully but leaves no runtime binary.

GNU tar cannot unpack Electron's .zip artifacts on Linux, so the fallback failed exactly in the CI/dev environments it was meant to repair. This change uses Electron's bundled @electron-internal/extract-zip helper (the same extractor used by electron/install.js) instead of tar or platform-specific shell extractors.

Test plan

  • node scripts/ensure-electron-installed.mjs succeeds when Electron is already installed
  • Verified @electron-internal/extract-zip resolves and imports from the Electron package
  • npm --prefix opennow-stable run typecheck
  • npm --prefix opennow-stable test
Open in Web Open in Cursor 

GNU tar cannot unpack Electron's .zip artifacts, so the archive fallback
path failed on Linux CI when the primary installer left no runtime binary.
Use Electron's bundled @electron-internal/extract-zip helper instead of
tar or platform-specific shell extractors.

Co-authored-by: Zortos <zortosdev@proton.me>
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5b4f729a-b816-4c77-9c65-8ade91d1bcc7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/fix-electron-zip-extraction-8b98

Comment @coderabbitai help to get the list of available commands.

@capy-ai

capy-ai Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Capy auto-review is paused for this organization because the usage-cycle auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews.

@zortos293
zortos293 merged commit ba2539e into dev Jun 27, 2026
16 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d1004ef5a4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

shell: false,
});
const electronRequire = createRequire(electronPackageJson);
const { extract } = await import(pathToFileURL(electronRequire.resolve("@electron-internal/extract-zip")).href);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Load a declared zip extractor in fallback

When the installer falls through to the archive fallback, this import is not reliable: Electron 42.3.3 declares extract-zip as its dependency, not @electron-internal/extract-zip, so installs without some unrelated hoisted transitive package throw MODULE_NOT_FOUND here after deleting dist. Even if that internal package is present, it is ESM default-only, so { extract } is undefined and the next line fails. This makes the fallback path unable to recover on the Linux machines it is meant to fix.

Useful? React with 👍 / 👎.

Chizuui pushed a commit to Chizuui/OpenNOW-Modified that referenced this pull request Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants