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

Function runVerify

test/gbrain-lib-verify.test.ts:27–37  ·  view source on GitHub ↗
(arg: string, stdin?: string)

Source from the content-addressed store, hash-verified

25const LIB = path.join(ROOT, 'bin', 'gstack-gbrain-lib.sh');
26
27function runVerify(arg: string, stdin?: string) {
28 const res = spawnSync(VERIFY, arg === '' ? [] : [arg], {
29 input: stdin,
30 encoding: 'utf-8',
31 });
32 return {
33 stdout: (res.stdout || '').trim(),
34 stderr: (res.stderr || '').trim(),
35 status: res.status ?? -1,
36 };
37}
38
39// Invoke a bash snippet that sources the lib and runs something against it.
40// Returns stdout + stderr + exit code. Stdin is piped so [ -t 0 ] = false.

Callers 1

Calls 1

spawnSyncFunction · 0.85

Tested by

no test coverage detected