fix: create public/blog/<post>/ before copying tex+pdf#29
Merged
Gavin-WangSC merged 1 commit intoComputerization:mainfrom Apr 29, 2026
Merged
Conversation
Previous commit moved the sha256 write to after pdfgenr success. That sha256 write was implicitly creating the destination directory via the File class's makedirs. Without it, shutil.copy now fails with FileNotFoundError on the very first new post (2026-02-15). Make pdfgenr create the output dir explicitly so neither code path relies on File()'s side effect.
✅ Deploy Preview for c13n-newsletter ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This was referenced Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to fix: keep publish job alive when one post's LaTeX fails #28. The merged change moved the sha256 write to after
pdfgenrsucceeds, but that write was implicitly creatingpublic/blog/<post>/via theFileclass'sos.makedirsside effect.Without it, the first new post (2026-02-15) crashes the publish job again:
Fix: have
pdfgenrcreate the destination directory explicitly so neither code path depends onFile()'s side effect.Confirmed in the failed run that the resilience change from fix: keep publish job alive when one post's LaTeX fails #28 is working —
2026-02-13now logsLaTeX failed: 2026-02-13 (no PDF produced); skippinginstead of crashing. This second failure is a regression I introduced; this PR closes it.Test plan
Generate New Article(or wait for the next scheduled trigger).2026-02-13is logged as a skip and2026-02-15onward compile and commit.