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