Skip to main content

locate_bash

Function locate_bash 

Source
pub(crate) fn locate_bash() -> Result<PathBuf>
Expand description

Locate bash. Order:

  1. $AGENTMUX_BASH — explicit override from agentmux-srv config.
  2. $BASH — set by bash itself when it spawns a child; reliable inside Claude Code’s hook context because Claude shells out to bash to run the hook.
  3. which bash on PATH.
  4. Well-known Windows paths (Git Bash, msys2). Skipped on Unix.

Fail-loud if not found — pass-through fallback would hide the issue.