pub(crate) fn resolve_windows(
env: &dyn Fn(&str) -> Option<OsString>,
is_file: &dyn Fn(&Path) -> bool,
) -> Option<PathBuf>Expand description
Windows search order, first hit wins:
AGENTMUX_BASH, if it names an existing file.sh.exeon PATH — the case that already worked (srv started from Git Bash, or a PATH that includes a Git tool directory). Its directory is on PATH, so the tools it needs are too.- The Git install that owns the
git.exeon PATH → itsbin\sh.exe. Covers a Git installed anywhere, as long asgititself works. - Standard Git install roots (machine-wide and per-user) →
bin\sh.exe.
Relative PATH entries are skipped: resolving . against srv’s cwd would
let a directory’s contents choose the shell.
Platform-neutral (takes its environment and filesystem as parameters, and
splits PATH on ; itself) so the order is unit-tested on every CI host.