()
| 70 | } |
| 71 | |
| 72 | async function discoverNodeFromShell() { |
| 73 | const shells = [ |
| 74 | getProcessEnvironmentVariable('SHELL'), |
| 75 | '/bin/bash', |
| 76 | '/bin/zsh', |
| 77 | '/bin/sh', |
| 78 | ].filter((shell): shell is string => Boolean(shell)) |
| 79 | for (const shell of [...new Set(shells)]) { |
| 80 | if (!isExecutableFile(shell)) continue |
| 81 | const candidate = await runShellNodeProbe(shell) |
| 82 | if (candidate) return candidate |
| 83 | } |
| 84 | return null |
| 85 | } |
| 86 | |
| 87 | export async function getNodeExecutable() { |
| 88 | if (cachedNodeExecutable) return cachedNodeExecutable |
no test coverage detected