mirror of
https://github.com/stablyai/orca.git
synced 2026-09-21 16:02:20 +00:00
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
12 lines
447 B
TypeScript
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'
|
|
}
|