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

Function cacheReady

pkg/npm/bin.js:17–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15const binPath = path.join(__dirname, 'bin', binName);
16const executionPath = binPath;
17const cacheReady = () => {
18 if (!fs.existsSync(binPath)) {
19 return false;
20 }
21 if (!isWindows) return true;
22 // A cached Windows binary that cannot report its own version is not usable.
23 const probe = spawnSync(binPath, ['--version'], {
24 stdio: 'ignore',
25 timeout: 15_000,
26 windowsHide: true,
27 });
28 return !probe.error && probe.status === 0;
29};
30
31if (!cacheReady()) {
32 // Binary missing — try running the install script (handles --ignore-scripts case)

Callers 1

bin.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected