fix(desktop): repair terminal shell spawning on macOS#3
Merged
Merged
Conversation
Ensure node-pty spawn-helper prebuilds have executable permissions, harden shell resolution with macOS fallbacks, and add terminal startup diagnostics. Extract shell resolution into a testable helper and cover valid SHELL, invalid SHELL fallback, and absolute executable shell selection.
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.
Summary
Fixes Electron Desktop terminal startup on macOS by ensuring node-pty's prebuilt spawn-helper has executable permissions and by hardening shell resolution.
The failure appeared as
posix_spawnp failedwhen starting the desktop terminal. The root cause was that the node-pty prebuild spawn-helper binary was unpacked without executable permissions afternpm ci.What Changed
apps/desktop/electron/terminal-shell.cjs.SHELL, falling back to macOS shell defaults.Validation
npm run type-check --workspace apps/desktop— PASSnpm run build --workspace apps/desktop— PASSnpm run test:desktop:platforms --workspace apps/desktop— 79 PASSnode --test apps/desktop/electron/terminal-shell.test.cjs— 13 PASSposix_spawnp failedno longer appearsScope