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

Function runConfig

test/user-slug-fallback.test.ts:33–43  ·  view source on GitHub ↗
(args: string[], extraEnv: Record<string, string> = {})

Source from the content-addressed store, hash-verified

31};
32
33function runConfig(args: string[], extraEnv: Record<string, string> = {}): { stdout: string; status: number; stderr: string } {
34 const result = spawnSync(CONFIG_BIN, args, {
35 encoding: 'utf-8',
36 env: {
37 ...process.env,
38 ...extraEnv,
39 },
40 timeout: 5000,
41 });
42 return { stdout: result.stdout || '', status: result.status ?? -1, stderr: result.stderr || '' };
43}
44
45beforeEach(() => {
46 TMP_HOME = mkdtempSync(join(tmpdir(), 'gstack-user-slug-test-'));

Callers 1

Calls 1

spawnSyncFunction · 0.85

Tested by

no test coverage detected