Skip to content

fix(ci): skip cargo-audit install if binary already exists on runner - #27

Merged
ferhimedamine merged 1 commit into
mainfrom
fix/cargo-audit-install-idempotent
Apr 6, 2026
Merged

ferhimedamine merged 1 commit into
mainfrom
fix/cargo-audit-install-idempotent

Conversation

@ferhimedamine

Copy link
Copy Markdown
Contributor

Problem

cargo install cargo-audit --locked fails with exit 101 when the binary already exists on the self-hosted ARM runner (runners persist state between runs).

Run 24013854053 (main push after #26 merged) shows:

error: binary `cargo-audit` already exists in destination
Add --force to overwrite

Fix

Use which cargo-audit >/dev/null 2>&1 || cargo install cargo-audit --locked — only installs if not already present. This matches the exact pattern used in the dakera core repo.

Root Cause

PR #26 added the cargo install step without the idempotency guard. The PR CI passed (runner didn't have the binary yet) but the subsequent main push failed.

🤖 Generated with Claude Code

Self-hosted ARM runners persist state between runs. cargo install
--locked fails with exit 101 when the binary is already present.
Match the pattern used in the dakera core repo.

Co-Authored-By: Paperclip <[email protected]>
@ferhimedamine ferhimedamine added the auto-merge Auto-merge when CI passes label Apr 6, 2026
@ferhimedamine
ferhimedamine merged commit 1ab2d2b into main Apr 6, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge Auto-merge when CI passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant