Expand description
Cross-platform tool binary resolution on PATH and well-known install dirs.
PATH walking follows the same contract as cortexkit/magic-context
packages/cli/src/lib/find-on-path.ts (PR #75): probe filesystem entries
without shelling out to which/where, and on Windows try
.exe โ .cmd โ .bat โ .com per PATH directory.
Functionsยง
- probe_
tool_ in_ dir - On Windows, prefer
dir/<binary>.exe|.cmd|.bat|.comover an extensionless file, which may be a colocated POSIX package-manager shim. - resolve_
on_ path - Resolve
binaryon the processPATH(PATHEXT-aware on Windows viawhich). An Apple developer-tools launcher on a Mac without the tools counts as not found, because running it opens the install dialog. - well_
known_ windows_ bin_ dirs