()
| 55 | } |
| 56 | |
| 57 | function detectSystemFdPath(): string | null { |
| 58 | for (const name of CANDIDATES) { |
| 59 | try { |
| 60 | const result = spawnSync(name, ['--version'], { stdio: 'ignore' }); |
| 61 | if (result.status === 0) return name; |
| 62 | } catch { |
| 63 | // ENOENT, EACCES, etc. — try next candidate. |
| 64 | } |
| 65 | } |
| 66 | return null; |
| 67 | } |
| 68 | |
| 69 | function getManagedFdPath(): string | null { |
| 70 | const binaryPath = getManagedFdBinaryPath(); |