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

Function resolveSlug

lib/bin-context.ts:11–15  ·  view source on GitHub ↗
(slugBinPath: string)

Source from the content-addressed store, hash-verified

9
10/** Resolve the project slug via the `gstack-slug` helper (parses `SLUG=...`). */
11export function resolveSlug(slugBinPath: string): string {
12 const r = spawnSync(slugBinPath, { encoding: "utf-8" });
13 const m = (r.stdout || "").match(/^SLUG=(.+)$/m);
14 return m ? m[1].trim() : "unknown";
15}
16
17/** Current git branch, or undefined on detached HEAD / outside a repo. */
18export function gitBranch(): string | undefined {

Callers

nothing calls this directly

Calls 1

spawnSyncFunction · 0.85

Tested by

no test coverage detected