From 49136f8cb014ad0cc364e56218d319fee89cbe18 Mon Sep 17 00:00:00 2001 From: Gabriel Grubba Date: Wed, 18 Jan 2023 14:38:33 -0300 Subject: [PATCH] solved admin test progress bar --- tools/cli/commands.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/cli/commands.js b/tools/cli/commands.js index 42eeb623dd..595089a15d 100644 --- a/tools/cli/commands.js +++ b/tools/cli/commands.js @@ -2897,8 +2897,9 @@ main.registerCommand({ }, hidden: true, catalogRefresh: new catalog.Refresh.Never() -}, function (options) { - buildmessage.enterJob({ title: "A test progressbar" }, function () { +}, async function (options) { + await buildmessage.enterJob({ title: "A test progressbar" }, async function () { + var progress = buildmessage.getCurrentProgressTracker(); var totalProgress = { current: 0, end: options.secs, done: false }; var i = 0; @@ -2908,7 +2909,7 @@ main.registerCommand({ totalProgress.end = undefined; } - new Promise(function (resolve) { + await new Promise(function (resolve) { function updateProgress() { i++; if (! options.spinner) { @@ -2926,7 +2927,7 @@ main.registerCommand({ } setTimeout(updateProgress); - }).await(); + }) }); });