Repository navigation
fix: keep Windows node-pty addons in the desktop package - #408
Merged
Merged
Conversation
pnpm deploy leaves pty.node as a store link. electron-builder turns that link into a directory junction on Windows, so the packaged Host has no pty.node and the package step stops.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 8 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
commit: |
Linux and macOS package jobs do not download the win32 prebuilds, so the staging check was failing those builds.
6 tasks done
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.
Requirement or Bug
The Windows desktop package step stops because
pty.nodeis missing from the packaged Host.Bug Reproduction Steps
Rerun the failed jobs on desktop release run 43546042628. The Windows job fails in
afterPackwith ENOENT forresources/host/node_modules/node-pty/prebuilds/win32-x64/pty.node.Root Cause
pnpm deployleavesnode-ptynative addons as links into the store. electron-builder recreates every link as a directory junction on Windows. A junction cannot bepty.node, so the file check inverify-packaged-runtime.tsfails. This is a fundamental fix of the copy, plus a restore at pack time if a link still gets through.Code Changes
Staging now copies the Host
node_moduleswith links expanded, then expands any link still undernode-pty, and refuses to continue unlesspty.node,conpty.node, andconpty_console_list.nodeare real files. The pack check copies those files from the staged tree when the packaged copy is missing or is still a link.Behavior Changes and Affected Users
win32-x64addonspty.nodeAffected module:
apps/desktopstaging andafterPack. Tests:stage-runtime.spec.ts,verify-packaged-runtime.spec.ts.Checklist
/approve).pnpm typechecklocally and it passes.