This repository was archived by the owner on Oct 13, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 55
This repository was archived by the owner on Oct 13, 2023. It is now read-only.
Job failing on trying to cargo install already existing crate #219
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Do the checklist before filing an issue:
- Is this related to the
actions-rsActions?
If you think it's a problem related to Github Actions in general, use GitHub Community forum instead: https://github.community - You've read the Contributing section about bugs reporting: https://github.com/actions-rs/.github/blob/master/CONTRIBUTING.md#reporting-bugs
- Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome.
Description
On my GitHub Actions CI pipeline the actin-rs/cargo@v1 errors using the install command when, due to caching, the target crate is already installed.
Workflow code
My Workflow file:
https://github.com/mr-pascal/changelog-generator/actions/runs/3451578950/workflow
See the test_coverage job workflow.
# Install "grcov"
- uses: actions-rs/cargo@v1
with:
command: install
args: grcovAction output
Run actions-rs/cargo@v1
with:
command: install
args: grcov
use-cross: false
env:
RUSTFLAGS: -Cinstrument-coverage
LLVM_PROFILE_FILE: coverage-%p-%m.profraw
/home/runner/.cargo/bin/cargo install grcov
Updating crates.io index
error: binary `grcov` already exists in destination
Error: Add --force to overwrite
Error: The process '/home/runner/.cargo/bin/cargo' failed with exit code 101
Expected behavior
Instead of throwing an error and failing the job I would expect a plain "Ignored" notice, that the package already exists and the job just continues.
Additional context
I use caching in the workflow to speed it up significantly, as such also the previous installed grcov is kept in cache and available.
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-2-${{ hashFiles('**/Cargo.lock') }}Using --force and just re-installing the crate is no option, since this would introduce also a re-compilation of the crate.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
