From d53778de5f46d1a37fb8ec55f67efa44aaedc9d2 Mon Sep 17 00:00:00 2001 From: Tommy G Date: Thu, 4 May 2023 16:33:36 +1000 Subject: [PATCH] Include .crates.toml in Rust example Using the existing example, cargo install will error out after restoring a cache: ``` cargo install cargo-tarpaulin Updating crates.io index error: binary `cargo-tarpaulin` already exists in destination Add --force to overwrite Error: Process completed with exit code 101. ``` `--force` is undesirable because it will recompile the binary. Cargo is scared of the existing binary because it doesn't have enough information about it. Including `~/.cargo/.crates.toml` coaxes it into being okay with the situation. --- examples.md | 1 + 1 file changed, 1 insertion(+) diff --git a/examples.md b/examples.md index 1bcde91..42170cb 100644 --- a/examples.md +++ b/examples.md @@ -591,6 +591,7 @@ whenever possible: - uses: actions/cache@v3 with: path: | + ~/.cargo/.crates.toml ~/.cargo/bin/ ~/.cargo/registry/index/ ~/.cargo/registry/cache/