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

Function run

test/gstack-redact-cli.test.ts:12–24  ·  view source on GitHub ↗
(
  args: string[],
  stdin: string,
)

Source from the content-addressed store, hash-verified

10const BIN = path.resolve(import.meta.dir, "..", "bin", "gstack-redact");
11
12function run(
13 args: string[],
14 stdin: string,
15): { code: number; stdout: string; stderr: string } {
16 const proc = Bun.spawnSync(["bun", BIN, ...args], {
17 stdin: Buffer.from(stdin),
18 });
19 return {
20 code: proc.exitCode,
21 stdout: proc.stdout.toString(),
22 stderr: proc.stderr.toString(),
23 };
24}
25
26describe("gstack-redact exit codes", () => {
27 test("clean → 0", () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected