fix: use || true per-file to handle missing Cargo.lock
This commit is contained in:
@@ -23,7 +23,7 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
# Hash both files; if Cargo.lock doesn't exist yet, only Cargo.toml is hashed
|
# 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 "hash=$HASH" >> $GITHUB_OUTPUT
|
||||||
echo "fingerprint=$HASH" >> $GITHUB_ENV
|
echo "fingerprint=$HASH" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user