MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getVersionFromSymlink

Function getVersionFromSymlink

src/utils/nativeInstaller/installer.ts:1018–1031  ·  view source on GitHub ↗
(
  symlinkPath: string,
)

Source from the content-addressed store, hash-verified

1016}
1017
1018async 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
1033function getLockFilePathFromVersionPath(
1034 dirs: ReturnType<typeof getBaseDirectories>,

Callers 1

cleanupOldVersionsFunction · 0.85

Calls 2

isPossibleClaudeBinaryFunction · 0.85
resolveFunction · 0.50

Tested by

no test coverage detected