sync: auto-sync from GURU-5070 at 2026-06-02 20:40:54

Author: Mike Swanson
Machine: GURU-5070
Timestamp: 2026-06-02 20:40:54
This commit is contained in:
2026-06-02 20:40:57 -07:00
parent 8e70d73ece
commit 446a6c1b1c
39 changed files with 1101 additions and 7 deletions

View File

@@ -0,0 +1,24 @@
# ensure-git-bash.ps1
# Ensures that the 'bash' command in the current PowerShell session resolves to
# Git for Windows / MSYS bash (required by ClaudeTools .sh scripts, vault, hooks, etc.)
# instead of the WSL stub in WindowsApps.
#
# Usage:
# . .claude/scripts/ensure-git-bash.ps1
# Or source in profile.
#
# Idempotent and safe.
$gitBin = "C:\Program Files\Git\bin"
$gitUsrBin = "C:\Program Files\Git\usr\bin"
if (Test-Path $gitBin) {
$current = (Get-Command bash -ErrorAction SilentlyContinue).Source
if ($current -notlike '*Git*bin*bash.exe') {
# Remove any existing Git entries first to avoid duplicates, then prepend
$env:Path = "$gitBin;$gitUsrBin;" + ($env:Path -replace [regex]::Escape("$gitBin;"), '' -replace [regex]::Escape("$gitUsrBin;"), '')
Write-Verbose "[ensure-git-bash] Remapped 'bash' to Git/MSYS bash"
}
} else {
Write-Warning "[ensure-git-bash] Git Bash not found at expected path $gitBin"
}