pub fn without_dir(dir: &Path, current: &OsStr) -> OsString
current with every occurrence of dir removed — the sanitized PATH the real command runs against, so nested tool calls don’t re-enter a shim.
current
dir