From dc7819824d798b8a09e53d99b6c5d82c2927f7c1 Mon Sep 17 00:00:00 2001 From: Hermes Date: Sat, 2 May 2026 15:51:12 -0700 Subject: [PATCH] fix: use || true per-file to handle missing Cargo.lock --- .gitea/actions/rust-cache/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/actions/rust-cache/action.yml b/.gitea/actions/rust-cache/action.yml index 62be3ef..ccc9495 100644 --- a/.gitea/actions/rust-cache/action.yml +++ b/.gitea/actions/rust-cache/action.yml @@ -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