From 3b440c6df8799a9ef91a669d7f47b04ced7ab934 Mon Sep 17 00:00:00 2001 From: Ibby Hadeed Date: Wed, 11 Apr 2018 12:59:41 -0400 Subject: [PATCH] Must return promise to asyncify! --- scripts/tasks/publish.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/tasks/publish.ts b/scripts/tasks/publish.ts index 82105156..cecbf9a0 100644 --- a/scripts/tasks/publish.ts +++ b/scripts/tasks/publish.ts @@ -75,7 +75,7 @@ function prepare() { async function publish(ignoreErrors = false) { Logger.profile('Publishing'); // upload 1 package per CPU thread at a time - const worker = Queue.async.asyncify((pkg: any) => { + const worker = Queue.async.asyncify((pkg: any) => new Promise((resolve, reject) => { exec(`npm publish ${pkg} ${FLAGS}`, (err, stdout) => { if (stdout) { @@ -96,8 +96,8 @@ async function publish(ignoreErrors = false) { } } }); - }); - }); + }) + ); try { await Queue(worker, PACKAGES, cpus().length);