Files
orca/src/shared/node-pty-spawn-helper.ts
T
Neil 34999e328e fix(orcad): stop demanding a spawn-helper only macOS builds (#18122)
node-pty declares the spawn-helper target inside binding.gyp's OS=="mac"
block and pty.cc execs it only under __APPLE__. Asserting it on
`!== 'win32'` made every Linux orcad boot degraded with
spawn_helper_missing while its terminals worked fine.

Route all four sites through one shared `usesNodePtySpawnHelper`
predicate: the precondition verdict, the prebuilt slot install, the
+x repair, and the prebuilds build script (which threw outright on a
Linux slot build).

Fixes #17844
2026-09-02 02:49:09 -07:00

12 lines
447 B
TypeScript

/**
* Whether node-pty execs its `spawn-helper` binary on a platform.
*
* Only macOS: binding.gyp declares the `spawn-helper` target inside `OS=="mac"`, and
* `src/unix/pty.cc` reads the helper path only under `#if defined(__APPLE__)`. Every
* other platform forks directly, so requiring the helper there calls a working host
* broken.
*/
export function usesNodePtySpawnHelper(platform: string): boolean {
return platform === 'darwin'
}