{"record":{"id":"d0ab72c73921cd3d","repo":"thedotmack/claude-mem","slug":"git-bash-not-found-claude-mem-hooks-require-bash","errorCode":null,"errorMessage":"Git Bash not found. claude-mem hooks require bash, and Claude Code resolves it via Git for Windows on Windows. Install Git for Windows (https://git-scm.com/download/win), or if bash is installed somewhere non-standard, set CLAUDE_CODE_GIT_BASH_PATH to the full path of bash.exe.","messagePattern":"Git Bash not found\\. claude-mem hooks require bash, and Claude Code resolves it via Git for Windows on Windows\\. Install Git for Windows \\(https://git-scm\\.com/download/win\\), or if bash is installed somewhere non-standard, set CLAUDE_CODE_GIT_BASH_PATH to the full path of bash\\.exe\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/npx-cli/commands/install.ts","lineNumber":2005,"sourceCode":"\n  const dot = styleText('dim', '·');\n  const segments = [`${styleText('bold', 'claude-mem')} ${styleText('cyan', `v${version}`)}`];\n  if (existingVersion && existingVersion !== version) {\n    segments.push(`installed ${styleText('yellow', `v${existingVersion}`)}`);\n  } else if (existingVersion) {\n    segments.push(styleText('dim', 'reinstall'));\n  }\n  log.info(segments.join(` ${dot} `));\n\n  // All claude-mem hooks run via `\"shell\": \"bash\"`; on Windows, Claude Code\n  // resolves that through Git for Windows with no WSL fallback. Surfacing it\n  // here — rather than letting the first hook throw an unbranded error — is\n  // a warning, not a hard stop: the operator may install Git for Windows\n  // after this run and hooks will start working without a reinstall.\n  if (IS_WINDOWS) {\n    const gitBash = checkWindowsGitBash();\n    if (!gitBash.ok) {\n      log.warn(gitBash.detail);\n    }\n  }\n\n  if (alreadyInstalled) {\n    if (process.stdin.isTTY) {\n      const shouldContinue = await p.confirm({\n        message: 'Overwrite existing installation?',\n        initialValue: true,\n      });\n\n      if (p.isCancel(shouldContinue) || !shouldContinue) {\n        p.cancel('Installation cancelled.');\n        process.exit(0);\n      }\n    }\n  }\n\n  let selectedIDEs: string[];","sourceCodeStart":1987,"sourceCodeEnd":2023,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/8bc631a71a487424b866756e43a6efa4574cc66b/src/npx-cli/commands/install.ts#L1987-L2023","documentation":"On Windows, the installer checks for Git Bash (bash.exe) via checkWindowsGitBash() because claude-mem hooks require bash and Claude Code on Windows resolves bash through Git for Windows. If the check fails, the installer logs this message as a warning (not a hard stop) explaining how to install Git for Windows or point CLAUDE_CODE_GIT_BASH_PATH at a non-standard bash.exe. Per the source comment, warning rather than failing is intentional: the operator may install Git for Windows later and hooks start working without a reinstall.","triggerScenarios":"IS_WINDOWS is true and checkWindowsGitBash() returns ok:false — Git for Windows is not installed, bash.exe is not in the locations Claude Code searches, or bash.exe is installed in a non-standard location and CLAUDE_CODE_GIT_BASH_PATH is not set.","commonSituations":"Fresh Windows machine without Git for Windows; Git installed via a stripped-down distribution without bash; bash.exe in a custom directory (scoop/chocolatey paths) not discovered automatically; WSL-only bash, which Claude Code does not use.","solutions":["Install Git for Windows from https://git-scm.com/download/win and re-run the install.","If bash.exe is already installed in a non-standard location, set CLAUDE_CODE_GIT_BASH_PATH to the full path of bash.exe and re-run install.","Verify bash.exe runs from a terminal (e.g. \"C:\\Program Files\\Git\\bin\\bash.exe\" --version).","If you plan to install Git later, you may proceed past this warning; hooks will start working once bash is available."],"exampleFix":"// before\nset CLAUDE_CODE_GIT_BASH_PATH=        (unset, bash not found)\n// after\nset CLAUDE_CODE_GIT_BASH_PATH=C:\\Program Files\\Git\\bin\\bash.exe\nnpx claude-mem install","handlingStrategy":"validation","validationCode":"import { existsSync } from 'fs';\nconst candidates = [process.env.CLAUDE_CODE_GIT_BASH_PATH, 'C:\\\\Program Files\\\\Git\\\\bin\\\\bash.exe'].filter(Boolean) as string[];\nconst ok = candidates.some(p => existsSync(p));\nif (!ok) console.warn('Install Git for Windows or set CLAUDE_CODE_GIT_BASH_PATH.');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install Git for Windows during Windows machine setup, before running claude-mem install.","Set CLAUDE_CODE_GIT_BASH_PATH whenever bash.exe lives outside the default Git install path.","Verify `bash --version` works in a shell before installing.","Re-run install after installing Git; hooks pick up bash without a reinstall."],"tags":["windows","git-bash","hooks","environment"],"backgroundTag":"missing-optional-dependency","analyzedSha":"8bc631a71a487424b866756e43a6efa4574cc66b","analyzedAt":"2026-09-09T10:47:06.009Z","contentChangedAt":"2026-09-09T10:47:06.009Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}