Skip to main content

resolve_cli

Function resolve_cli 

Source
pub fn resolve_cli(forge: Forge) -> Result<PathBuf, RkError>
Expand description

Resolve the forge CLI once, at context time: the RK_GH_BIN and RK_GLAB_BIN overrides first, then a PATH search.

The search takes the first executable file named for the CLI, as the operating system’s own search does, so a file that cannot run never shadows one that can. rk branches prune shares it for the verify path. The shared tool check then judges that exact file, by its absolute path, so every caller runs the file the check judged.

§Errors

Refuses when the override or the search resolves no usable binary, or the binary it resolves runs below its floor.