Skip to content

Commit

Permalink
Warn users if their local binaries can get in a way
Browse files Browse the repository at this point in the history
Upstream cargo issue: rust-lang/cargo#11020
  • Loading branch information
dpc committed Aug 24, 2022
1 parent d1e696d commit 885a790
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,13 @@
# auto-install git hooks
for hook in misc/git-hooks/* ; do ln -sf "../../$hook" "./.git/hooks/" ; done
${pkgs.git}/bin/git config commit.template misc/git-hooks/commit-template.txt
# workaround https://github.com/rust-lang/cargo/issues/11020
cargo_cmd_bins=( $(ls $HOME/.cargo/bin/cargo-{clippy,add} 2>/dev/null) )
if (( ''${#cargo_cmd_bins[@]} != 0 )); then
echo "Warning: Detected binaries that might conflict with reproducible environment: ''${cargo_cmd_bins[@]}" 1>&2
echo "Warning: Considering deleting them. See https://github.com/rust-lang/cargo/issues/11020 for details" 1>&2
fi
'';
};

Expand Down

0 comments on commit 885a790

Please sign in to comment.