fix(cli): a failed --against reference no longer also says it has no frame (#6574)

This commit is contained in:
Miguel Ángel
2026-10-27 16:49:16 +00:00
committed by GitHub
parent 98e774384e
commit 696ca8f779
+3 -3
View File
@@ -1145,11 +1145,11 @@ async function captureSnapshots(
if (opts.against) {
// Frame-exact reference frame beside the render, so a rebuild can be
// checked against its footage without hand-rolled ffmpeg + montage.
const warned = warnings.length;
const refPng = await extractVideoFrameOrWarn(warnings, opts.against, time);
if (!refPng) {
console.error(
` ${c.warn("⚠")} --against has no frame at ${timeLabel} — reference pair skipped`,
);
const why = warnings.length > warned ? "" : ` has no frame at ${timeLabel}`;
console.error(` ${c.warn("⚠")} --against${why} — reference pair skipped`);
} else {
const refPath = join(snapshotDir, `ref-${slot}.png`);
writeCaptureFileSync(refPath, refPng);