From ccdeb1d1fd246f0e7c87985bcf439fadb9e6ce0c Mon Sep 17 00:00:00 2001 From: Tiago Castro Date: Wed, 17 Jul 2024 16:24:52 +0100 Subject: [PATCH] build: ensure we use our rust binaries If the cargo home exists, it takes precedence, unless we add it to the path, with lower precedence... Signed-off-by: Tiago Castro --- scripts/rust-linter-env.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/rust-linter-env.sh b/scripts/rust-linter-env.sh index 39ce7db..4418590 100644 --- a/scripts/rust-linter-env.sh +++ b/scripts/rust-linter-env.sh @@ -66,6 +66,9 @@ if [ -n "$RUST_NIGHTLY_PATH" ]; then # cargo searches PATH for its subcommands (e.g. cargo fmt), so export # PATH with RUST_NIGHTLY_PATH put before all other PATHs. PATH=$RUST_NIGHTLY_PATH/bin:$PATH + # cargo attempts to search in ~/.cargo/bin first, so we need to put + # that at the end of the path as a quirky WA... sad :( + PATH=$PATH:~/.cargo/bin fi # Try cargo from PATH.