MCPcopy Create free account
hub / github.com/agent-tower/core / ensureGitAvailable

Function ensureGitAvailable

packages/server/src/git/git-cli.ts:170–181  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

168 */
169export async function ensureGitAvailable(): Promise<void> {
170 try {
171 await runOwnedCommand('git', ['--version'], { timeout: 5_000 });
172 } catch {
173 throw new GitError(
174 'git is not installed or not found on PATH',
175 'GIT_NOT_AVAILABLE'
176 );
177 }
178}
179
180// ─── Branch Name Validation ───────────────────────────────────────────────────
181
182/**
183 * Validate a git branch name.
184 * Follows rules from `git check-ref-format --branch`:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected