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.
Motivation and Context
Caching cargo install PACKAGE errors with
error: binary `PACKAGE` already exists in destination
This can be circumvented by using --force but this negates any benefit of using the cache.
How Has This Been Tested?
I am using the example with this change on my own private repo successfully.
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[x] Documentation (add or update README or docs)
Checklist:
[x] My code follows the code style of this project.
[x] My change requires a change to the documentation.
Description
Using the existing example, cargo install will error out after restoring a cache:
--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.Motivation and Context
Caching
cargo install PACKAGE
errors withThis can be circumvented by using
--force
but this negates any benefit of using the cache.How Has This Been Tested?
I am using the example with this change on my own private repo successfully.
Types of changes
Checklist: