( symlinkPath: string, )
| 1004 | } |
| 1005 | |
| 1006 | async function getVersionFromSymlink( |
| 1007 | symlinkPath: string, |
| 1008 | ): Promise<string | null> { |
| 1009 | try { |
| 1010 | const target = await readlink(symlinkPath) |
| 1011 | const absoluteTarget = resolve(dirname(symlinkPath), target) |
| 1012 | if (await isPossibleNcodeBinary(absoluteTarget)) { |
| 1013 | return absoluteTarget |
| 1014 | } |
| 1015 | } catch { |
| 1016 | // Not a symlink / doesn't exist / target doesn't exist |
| 1017 | } |
| 1018 | return null |
| 1019 | } |
| 1020 | |
| 1021 | function getLockFilePathFromVersionPath( |
| 1022 | dirs: ReturnType<typeof getBaseDirectories>, |
no test coverage detected