MCPcopy Create free account
hub / github.com/garrytan/gstack / idOf

Function idOf

test/gstack-gbrain-sync.test.ts:435–446  ·  view source on GitHub ↗
(cwd: string)

Source from the content-addressed store, hash-verified

433 }
434
435 const idOf = (cwd: string): string => {
436 const r = spawnSync("bun", [SCRIPT, "--dry-run", "--code-only", "--quiet"], {
437 encoding: "utf-8",
438 timeout: 60000,
439 cwd,
440 env: { ...process.env, HOME: home, GSTACK_HOME: gstackHome },
441 });
442 expect(r.status).toBe(0);
443 const m = (r.stdout || "").match(/gbrain sources add (\S+)/);
444 expect(m).not.toBeNull();
445 return m![1];
446 };
447
448 const idA = idOf(repoA);
449 const idB = idOf(repoB);

Callers 1

Calls 1

spawnSyncFunction · 0.85

Tested by

no test coverage detected