Skip to content

Commit 55be35a

Browse files
committed
fix: add --locked flag to cargo install cargo-llvm-cov in coverage.sh
Without --locked, cargo resolves the newest compatible versions of all transitive dependencies at install time, which can produce different binaries across runs and pull in unreviewed dependency updates. The --locked flag forces cargo to use the dependency versions pinned in cargo-llvm-cov's own Cargo.lock, making the install reproducible.
1 parent a3768d0 commit 55be35a

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@googleworkspace/cli": patch
3+
---
4+
5+
Add --locked flag to cargo install cargo-llvm-cov in coverage.sh for reproducible installs

scripts/coverage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ set -euo pipefail
1818
# Check if cargo-llvm-cov is installed
1919
if ! cargo llvm-cov --version &> /dev/null; then
2020
echo "cargo-llvm-cov is not installed. Installing..."
21-
cargo install cargo-llvm-cov
21+
cargo install --locked cargo-llvm-cov
2222
fi
2323

2424
# Run coverage and generate HTML report

0 commit comments

Comments
 (0)