MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / ensureBinary

Function ensureBinary

pkg/go/cmd/codebase-memory-mcp/main.go:143–158  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

141}
142
143func ensureBinary() (string, error) {
144 binary := binPath()
145 ready, err := runtimeSetReadyLocked(
146 filepath.Dir(binary), filepath.Base(binary), verifyCandidate,
147 )
148 if err != nil {
149 return "", err
150 }
151 if ready {
152 return executionPathForOS(binary, runtime.GOOS), nil
153 }
154 if err := download(binary); err != nil {
155 return "", err
156 }
157 return executionPathForOS(binary, runtime.GOOS), nil
158}
159
160func binPath() string {
161 return filepath.Join(

Callers 1

mainFunction · 0.85

Calls 4

binPathFunction · 0.85
runtimeSetReadyLockedFunction · 0.85
executionPathForOSFunction · 0.85
downloadFunction · 0.70

Tested by

no test coverage detected