Problem
We are using Nix (nix develop
) to prepare a reproducible build environment for the Rust codebase. Some users report that cargo clippy
fails due to incompatible version of Rust compiler(?), while it works for other users as the cargo-clippy
is reproducibly available in the $PATH
.
After some debugging it turns out that users that have cargo-clippy
installed in $HOME/.cargo/bin
are affected because cargo
prefers such binaries over those in $PATH
, breaking out of the "sandbox".
Steps
N/A
Possible Solution(s)
- Change the order of variables in
|
let mut dirs = vec![config.home().clone().into_path_unlocked().join("bin")]; |
so that Rust home binaries are tried last.
Notes
No response
Version
No response