* Try to locate the gstack-telemetry-log binary. Resolution order matches * the existing skill preamble pattern (never relies on PATH — packaged * binary layouts can break that). * * Order: * 1. ~/.claude/skills/gstack/bin/gstack-telemetry-log (global install) * 2. .claude/skills/gstack/bin
()
| 398 | * 3. bin/gstack-telemetry-log (in-repo dev) |
| 399 | */ |
| 400 | function findTelemetryBinary(): string | null { |
| 401 | const candidates = [ |
| 402 | path.join(os.homedir(), '.claude', 'skills', 'gstack', 'bin', 'gstack-telemetry-log'), |
| 403 | path.resolve(process.cwd(), '.claude', 'skills', 'gstack', 'bin', 'gstack-telemetry-log'), |
| 404 | path.resolve(process.cwd(), 'bin', 'gstack-telemetry-log'), |
| 405 | ]; |
| 406 | for (const c of candidates) { |
| 407 | try { |
| 408 | fs.accessSync(c, fs.constants.X_OK); |
| 409 | return c; |
| 410 | } catch { |
| 411 | // try next |
| 412 | } |
| 413 | } |
| 414 | return null; |
| 415 | } |
| 416 | |
| 417 | /** |
| 418 | * Resolve a bash binary for invoking shebang scripts on Windows. Mirrors the |
no outgoing calls
no test coverage detected