MCPcopy Create free account
hub / github.com/Noumena-Network/code / getVersionFromSymlink

Function getVersionFromSymlink

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

Source from the content-addressed store, hash-verified

1004}
1005
1006async 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
1021function getLockFilePathFromVersionPath(
1022 dirs: ReturnType<typeof getBaseDirectories>,

Callers 1

cleanupOldVersionsFunction · 0.85

Calls 2

isPossibleNcodeBinaryFunction · 0.85
resolveFunction · 0.50

Tested by

no test coverage detected