From 1291f309ffb2134bb9cf60ac3d19b024b97efc09 Mon Sep 17 00:00:00 2001 From: rUv Date: Wed, 7 Jan 2026 15:09:38 +0000 Subject: [PATCH] Checkpoint: File edits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automatic checkpoint created by Claude Code - Branch: v3 - Timestamp: 2026-01-07T15:09:38Z - Changes: 1 file(s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- v3/@claude-flow/cli/src/commands/doctor.ts | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/v3/@claude-flow/cli/src/commands/doctor.ts b/v3/@claude-flow/cli/src/commands/doctor.ts index d22d80a261..9f7b8c607f 100644 --- a/v3/@claude-flow/cli/src/commands/doctor.ts +++ b/v3/@claude-flow/cli/src/commands/doctor.ts @@ -152,24 +152,20 @@ async function checkApiKeys(): Promise { } } -// Check git (async) +// Check git (async with proper env inheritance) async function checkGit(): Promise { try { - const { promisify } = require('util'); - const execAsync = promisify(require('child_process').exec); - const { stdout } = await execAsync('git --version', { encoding: 'utf8', timeout: 5000 }); - return { name: 'Git', status: 'pass', message: stdout.trim().replace('git version ', 'v') }; + const version = await runCommand('git --version'); + return { name: 'Git', status: 'pass', message: version.replace('git version ', 'v') }; } catch { return { name: 'Git', status: 'warn', message: 'Not installed', fix: 'Install git from https://git-scm.com' }; } } -// Check if in git repo (async) +// Check if in git repo (async with proper env inheritance) async function checkGitRepo(): Promise { try { - const { promisify } = require('util'); - const execAsync = promisify(require('child_process').exec); - await execAsync('git rev-parse --git-dir', { encoding: 'utf8', timeout: 5000 }); + await runCommand('git rev-parse --git-dir'); return { name: 'Git Repository', status: 'pass', message: 'In a git repository' }; } catch { return { name: 'Git Repository', status: 'warn', message: 'Not a git repository', fix: 'git init' };