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

Function runScript

test/gstack-memory-ingest.test.ts:31–42  ·  view source on GitHub ↗
(args: string[], env: Record<string, string> = {})

Source from the content-addressed store, hash-verified

29}
30
31function runScript(args: string[], env: Record<string, string> = {}): { stdout: string; stderr: string; exitCode: number } {
32 const result = spawnSync("bun", [SCRIPT, ...args], {
33 encoding: "utf-8",
34 timeout: 30000,
35 env: { ...process.env, ...env },
36 });
37 return {
38 stdout: result.stdout || "",
39 stderr: result.stderr || "",
40 exitCode: result.status ?? 1,
41 };
42}
43
44function writeClaudeCodeSession(home: string, projectName: string, sessionId: string, content: string): string {
45 const projectsDir = join(home, ".claude", "projects", projectName);

Callers 1

Calls 1

spawnSyncFunction · 0.85

Tested by

no test coverage detected