fix(gbrain): probe CLI without command builtin

This commit is contained in:
Jayesh Betala
2026-05-16 13:56:32 -07:00
committed by Garry Tan
parent cfd2b5d792
commit f8e4291521
6 changed files with 29 additions and 18 deletions
-12
View File
@@ -429,15 +429,6 @@ function constrainSourceId(prefix: string, raw: string): string {
return tail ? `${prefix}-${tail}-${hash}` : `${prefix}-${hash}`;
}
function gbrainAvailable(): boolean {
try {
execSync("command -v gbrain", { stdio: "ignore" });
return true;
} catch {
return false;
}
}
// ── Lock file (D1) ─────────────────────────────────────────────────────────
interface LockInfo {
@@ -529,9 +520,6 @@ async function runCodeImport(args: CliArgs): Promise<StageResult> {
if (!root) {
return { name: "code", ran: false, ok: true, duration_ms: 0, summary: "skipped (not in git repo)" };
}
if (!gbrainAvailable()) {
return { name: "code", ran: false, ok: false, duration_ms: 0, summary: "skipped (gbrain CLI not in PATH)" };
}
const sourceId = deriveCodeSourceId(root);