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

Function run

test/gstack-settings-hook-schema-aware.test.ts:31–42  ·  view source on GitHub ↗
(args: string[])

Source from the content-addressed store, hash-verified

29});
30
31function run(args: string[]): { stdout: string; stderr: string; exitCode: number } {
32 try {
33 const stdout = execSync([SETTINGS_HOOK, ...args].map((s) => `'${s}'`).join(' '), {
34 env: { ...process.env, GSTACK_SETTINGS_FILE: settingsFile },
35 encoding: 'utf-8',
36 timeout: 10000,
37 });
38 return { stdout, stderr: '', exitCode: 0 };
39 } catch (e: any) {
40 return { stdout: e.stdout || '', stderr: e.stderr || '', exitCode: e.status ?? 1 };
41 }
42}
43
44function settings(): any {
45 return JSON.parse(fs.readFileSync(settingsFile, 'utf-8'));

Calls

no outgoing calls

Tested by

no test coverage detected