fix: use || true per-file to handle missing Cargo.lock

This commit is contained in:
Hermes
2026-05-02 15:51:12 -07:00
parent a681e5a907
commit dc7819824d

View File

@@ -23,7 +23,7 @@ runs:
shell: bash
run: |
# Hash both files; if Cargo.lock doesn't exist yet, only Cargo.toml is hashed
HASH=$(cat Cargo.toml Cargo.lock 2>/dev/null | sha256sum | cut -d' ' -f1)
HASH=$( (cat Cargo.toml 2>/dev/null || true; cat Cargo.lock 2>/dev/null || true) | sha256sum | cut -d' ' -f1)
echo "hash=$HASH" >> $GITHUB_OUTPUT
echo "fingerprint=$HASH" >> $GITHUB_ENV