Use git diff --exit-code in conditional

This commit is contained in:
Anmol Wadhwani
2024-12-12 23:59:58 +05:30
parent 1403f21d1c
commit 2c3e0df6e9

View File

@ -33,7 +33,7 @@ jobs:
- name: Update zig cache hash - name: Update zig cache hash
run: | run: |
# Only proceed if build.zig.zon has changed # Only proceed if build.zig.zon has changed
if [ "$(git status build.zig.zon --porcelain)" ]; then if ! git diff --exit-code build.zig.zon; then
nix develop -c ./nix/build-support/check-zig-cache-hash.sh --update nix develop -c ./nix/build-support/check-zig-cache-hash.sh --update
fi fi