pub fn check(
path_var: Option<&OsStr>,
name: &str,
ours: &Path,
dispatcher: Option<&Path>,
) -> ShadowingExpand description
Compare what varve dispatches against what PATH would run.
dispatcher is varve’s OWN executable. This is not an optimisation — it is
the whole correctness of the check. A varve shim is a symlink to the varve
binary, not to the pinned tool: running rivet executes varve, which reads
argv[0] and dispatches the pinned binary (the argv[0] mechanism that
replaced the old shell scripts in v0.19.0). So a correctly installed shim
canonicalises to varve, NOT to the tool, and a naive path comparison flags
every properly configured machine as shadowed.
An earlier draft did exactly that, and its unit test passed because the test symlinked to the STORE — testing a mechanism varve does not use. The end-to-end run caught it.