MCPcopy
hub / github.com/garrytan/gstack / gbrainIdentity

Function gbrainIdentity

lib/gbrain-guards.ts:160–168  ·  view source on GitHub ↗
(env: NodeJS.ProcessEnv)

Source from the content-addressed store, hash-verified

158let _keepStorageMemo: { key: string; value: boolean } | undefined;
159
160function gbrainIdentity(env: NodeJS.ProcessEnv): string {
161 const r = spawnSync("gbrain", ["--version"], {
162 encoding: "utf-8",
163 timeout: 3_000,
164 shell: NEEDS_SHELL_ON_WINDOWS,
165 env,
166 });
167 return (r.stdout || "").trim() || "unknown";
168}
169
170export function gbrainSupportsKeepStorage(env: NodeJS.ProcessEnv = process.env): boolean {
171 const key = gbrainIdentity(env);

Callers 1

Calls 1

spawnSyncFunction · 0.85

Tested by

no test coverage detected