( symlinkPath: string, )
| 1016 | } |
| 1017 | |
| 1018 | async function getVersionFromSymlink( |
| 1019 | symlinkPath: string, |
| 1020 | ): Promise<string | null> { |
| 1021 | try { |
| 1022 | const target = await readlink(symlinkPath) |
| 1023 | const absoluteTarget = resolve(dirname(symlinkPath), target) |
| 1024 | if (await isPossibleClaudeBinary(absoluteTarget)) { |
| 1025 | return absoluteTarget |
| 1026 | } |
| 1027 | } catch { |
| 1028 | // Not a symlink / doesn't exist / target doesn't exist |
| 1029 | } |
| 1030 | return null |
| 1031 | } |
| 1032 | |
| 1033 | function getLockFilePathFromVersionPath( |
| 1034 | dirs: ReturnType<typeof getBaseDirectories>, |
no test coverage detected