Skip to content

fix(shell): look for spawn-helper in prebuilds dir, not just build/Re…#50

Merged
DannyNs merged 1 commit into
mainfrom
fix/macos-shell-spawn
Jun 18, 2026
Merged

fix(shell): look for spawn-helper in prebuilds dir, not just build/Re…#50
DannyNs merged 1 commit into
mainfrom
fix/macos-shell-spawn

Conversation

@DannyNs

@DannyNs DannyNs commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

…lease

Correction to the prior commit. node-pty 1.1.0 ships prebuilt binaries, and loadNativeModule() loads pty.node from prebuilds/-/ — so spawn-helper lives THERE, next to it, not in build/Release. The first guard only checked build/Release, so on a normal (prebuild) install it found nothing and fixed nothing, while falsely reporting the helper missing.

ensureSpawnHelperExecutable now mirrors node-pty's own search order (build/Release, build/Debug, prebuilds/-) and repairs every spawn-helper it finds: chmod +x when the execute bit is missing (the real cause — pnpm store extraction drops it) and strip com.apple.quarantine. Only when none exist anywhere does it log the rebuild-from-source hint.

spawnHelperCandidateDirs extracted as a pure, unit-tested helper.

…lease

Correction to the prior commit. node-pty 1.1.0 ships prebuilt binaries, and
loadNativeModule() loads pty.node from prebuilds/<platform>-<arch>/ — so
spawn-helper lives THERE, next to it, not in build/Release. The first guard
only checked build/Release, so on a normal (prebuild) install it found nothing
and fixed nothing, while falsely reporting the helper missing.

ensureSpawnHelperExecutable now mirrors node-pty's own search order
(build/Release, build/Debug, prebuilds/<platform>-<arch>) and repairs every
spawn-helper it finds: chmod +x when the execute bit is missing (the real
cause — pnpm store extraction drops it) and strip com.apple.quarantine. Only
when none exist anywhere does it log the rebuild-from-source hint.

spawnHelperCandidateDirs extracted as a pure, unit-tested helper.
@DannyNs DannyNs merged commit 8308b63 into main Jun 18, 2026
1 check passed
@DannyNs DannyNs deleted the fix/macos-shell-spawn branch June 18, 2026 11:18
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.

1 participant