Skip to content

Commit f49c0ed

Browse files
fix: handle empty deno fmt/lint targets gracefully
All JS files are in src-tauri/dist which is excluded in deno.jsonc, so deno fmt/lint find no files. Handle this case without failing. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent af2bbd5 commit f49c0ed

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/test.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,20 @@ jobs:
8585
deno-version: v2.x
8686

8787
- name: Check Deno formatting
88-
run: deno fmt --check
88+
run: |
89+
if deno fmt --check 2>&1 | grep -q "No target files found"; then
90+
echo "No files to format (all excluded in deno.jsonc)"
91+
else
92+
deno fmt --check
93+
fi
8994
9095
- name: Run Deno lint
91-
run: deno lint
96+
run: |
97+
if deno lint 2>&1 | grep -q "No target files found"; then
98+
echo "No files to lint (all excluded in deno.jsonc)"
99+
else
100+
deno lint
101+
fi
92102
93103
# Vitest unit tests with coverage
94104
vitest-tests:

0 commit comments

Comments
 (0)