Skip to main content

Module tool_path

Module tool_path 

Source
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|.com over an extensionless file, which may be a colocated POSIX package-manager shim.
resolve_on_path
Resolve binary on the process PATH (PATHEXT-aware on Windows via which). 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