Skip to content

Commit cb1bc93

Browse files
committed
tools: show diff alongside the error in Nix linter
1 parent d3f79aa commit cb1bc93

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)