Fix HTML compile success check: size is undefined for non-PDF outputs
Build and Deploy Verso / deploy (push) Has been cancelled
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:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user