Repository navigation
Commit 166c556
Fix report --out failing when its directory doesn't exist yet
Found by the community-monitor workflow's own first real run on
GitHub Actions: "Build the dashboard's data index" failed with a bare
"No such file or directory" writing results/index.json, because the
prior step (an empty community-forms/ registry — nothing real
registered yet) never created results/ at all, and `report --out`
never created it either.
This is the exact bug class already fixed once for `formwatch init
subdir/file.yml` earlier this session — that fix just never reached
`report`'s own two --out write sites (--json and --html). Extracted
both fixes into one write_output() helper so there's a single place
this gets right, and reused it from init() too instead of leaving two
copies of the same logic.
Verified with a test building on a fresh temp dir, then confirmed it's
meaningful by stripping the parent-directory creation out of
write_output() and watching it fail with the exact same "No such file
or directory" error the real workflow run hit, before restoring it.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 0740871 commit 166c556
2 files changed
Lines changed: 42 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
121 | 127 | | |
122 | 128 | | |
123 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
| 256 | + | |
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
292 | 306 | | |
293 | 307 | | |
294 | 308 | | |
| |||
302 | 316 | | |
303 | 317 | | |
304 | 318 | | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
| 319 | + | |
311 | 320 | | |
312 | 321 | | |
313 | 322 | | |
| |||
488 | 497 | | |
489 | 498 | | |
490 | 499 | | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
491 | 519 | | |
492 | 520 | | |
493 | 521 | | |
| |||
0 commit comments