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

Function run

test/gstack-question-log.test.ts:24–35  ·  view source on GitHub ↗
(payload: string)

Source from the content-addressed store, hash-verified

22});
23
24function run(payload: string): { stdout: string; stderr: string; status: number } {
25 const res = spawnSync(BIN, [payload], {
26 env: { ...process.env, GSTACK_HOME: tmpHome },
27 encoding: 'utf-8',
28 cwd: ROOT,
29 });
30 return {
31 stdout: res.stdout ?? '',
32 stderr: res.stderr ?? '',
33 status: res.status ?? -1,
34 };
35}
36
37function readLog(): string[] {
38 const projects = fs.readdirSync(path.join(tmpHome, 'projects'));

Callers 1

Calls 1

spawnSyncFunction · 0.85

Tested by

no test coverage detected