From d2d5ff1c23c4ecf785b29435335b73515d83c2db Mon Sep 17 00:00:00 2001 From: Nikola Maric <3995223+maricn@users.noreply.github.com> Date: Wed, 6 May 2020 20:59:19 +0200 Subject: [PATCH] fix: Check progress to declare rendering done --- commands/render.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/commands/render.js b/commands/render.js index 94fae37..803a6b6 100644 --- a/commands/render.js +++ b/commands/render.js @@ -154,7 +154,12 @@ function renderFrames(records, options) { if (code !== 0) { reject(new Error("Rendering exited with code " + code)); } else { - console.log(di.chalk.green('Finished rendering frames in ' + (Date.now() - start) + 'ms.')); + if (progressBar.complete) { + console.log(di.chalk.green('[render] Process successfully completed in ' + (Date.now() - start) + 'ms.')); + } else { + console.log(di.chalk.yellow('[render] Process completion unverified')); + } + resolve(); } }; @@ -249,7 +254,7 @@ function mergeFrames(records, options, frameDimensions) { gif.finish(); // Finish - console.log(di.chalk.green('Finished merging frames in ' + (Date.now() - start) + 'ms.')); + console.log(di.chalk.green('[merge] Process successfully completed in ' + (Date.now() - start) + 'ms.')); resolve(); });