Fix HTML compile success check: size is undefined for non-PDF outputs
Build and Deploy Verso / deploy (push) Has been cancelled

collectOutputPdfSize() only calls stat() and sets .size on output.pdf.
All other output files (including output.html) keep size: undefined.
The previous check required file.size > 0 for both PDF and HTML, so
undefined > 0 always evaluated false for output.html, making every
RevealJS compile report 'failure' even when the file was produced.

Fix: require size > 0 only for output.pdf; accept output.html
regardless of size (it is always non-empty if Quarto succeeded).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
claude
2026-05-31 16:27:02 +00:00
parent 090018c191
commit 24cd4bf13d
+2 -3
View File
@@ -91,9 +91,8 @@ function compile(req, res, next) {
if (
outputFiles.some(
file =>
(file.path === 'output.pdf' ||
file.path === 'output.html') &&
file.size > 0
(file.path === 'output.pdf' && file.size > 0) ||
file.path === 'output.html'
)
) {
status = 'success'