(projectRoot: string)
| 67 | * — bind would throw ENAMETOOLONG, so we skip straight to tmpdir. |
| 68 | */ |
| 69 | export function getDaemonSocketCandidates(projectRoot: string): string[] { |
| 70 | if (process.platform === 'win32') { |
| 71 | return [`\\\\.\\pipe\\codegraph-${projectHash(projectRoot)}`]; |
| 72 | } |
| 73 | const inProject = path.join(getCodeGraphDir(projectRoot), 'daemon.sock'); |
| 74 | const tmp = tmpdirSocketPath(projectRoot); |
| 75 | if (inProject.length > POSIX_SOCKET_PATH_LIMIT) return [tmp]; |
| 76 | return [inProject, tmp]; |
| 77 | } |
| 78 | |
| 79 | /** |
| 80 | * The PREFERRED (primary) socket path — candidate 0. Use this only where a |
no test coverage detected