MCPcopy Create free account
hub / github.com/tiann/hapi / areToolsUnpacked

Function areToolsUnpacked

cli/src/runtime/assets.ts:53–68  ·  view source on GitHub ↗
(unpackedPath: string)

Source from the content-addressed store, hash-verified

51}
52
53function areToolsUnpacked(unpackedPath: string): boolean {
54 if (!existsSync(unpackedPath)) {
55 return false;
56 }
57
58 const isWin = platform() === 'win32';
59 const difftBinary = isWin ? 'difft.exe' : 'difft';
60 const rgBinary = isWin ? 'rg.exe' : 'rg';
61
62 const expectedFiles = [
63 join(unpackedPath, difftBinary),
64 join(unpackedPath, rgBinary)
65 ];
66
67 return expectedFiles.every((file) => existsSync(file));
68}
69
70function isTunwgReady(runtimeRoot: string): boolean {
71 const isWin = platform() === 'win32';

Callers 2

unpackToolsFunction · 0.70
runtimeAssetsReadyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected