Skip to content

Commit f402b4e

Browse files
committed
tools: show diff alongside the error in Nix linter
PR-URL: #60301 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent 5d5c848 commit f402b4e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/linters.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ jobs:
151151
sparse-checkout-cone-mode: false
152152
- uses: cachix/install-nix-action@7be5dee1421f63d07e71ce6e0a9f8a4b07c2a487 # v31.6.1
153153
- name: Lint Nix files
154-
run: nix-shell -I nixpkgs=./tools/nix/pkgs.nix -p 'nixfmt-tree' --run 'treefmt --quiet --fail-on-change'
155-
- if: ${{ failure() }}
156-
name: Show diff
157-
run: git --no-pager diff
154+
run: |
155+
nix-shell -I nixpkgs=./tools/nix/pkgs.nix -p 'nixfmt-tree' --run '
156+
treefmt --quiet --fail-on-change
157+
' || git --no-pager diff --exit-code
158158
159159
lint-py:
160160
if: github.event.pull_request.draft == false

0 commit comments

Comments
 (0)