Skip to main content

Module lookup

Module lookup 

Source
Expand description

Locating a tool binary the way the process spawner would.

Availability is answered in-process rather than by spawning which or where. Neither finder is part of any platform contract (a minimal container image routinely lacks which), and a spawn that fails because the finder is missing is indistinguishable from the tool being missing: every configured tool then reports “not found in PATH” while sitting on the PATH. The rules here mirror what Command::new itself resolves, so a tool reported present is one that will spawn and one reported missing is one that would not have.

Functions§

resolve_program
Where Command::new(program) would find program, or None if it would not.