Must return promise to asyncify!

This commit is contained in:
Ibby Hadeed 2018-04-11 12:59:41 -04:00
parent ad1848899d
commit 3b440c6df8

View File

@ -75,7 +75,7 @@ function prepare() {
async function publish(ignoreErrors = false) { async function publish(ignoreErrors = false) {
Logger.profile('Publishing'); Logger.profile('Publishing');
// upload 1 package per CPU thread at a time // 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<any>((resolve, reject) => { new Promise<any>((resolve, reject) => {
exec(`npm publish ${pkg} ${FLAGS}`, (err, stdout) => { exec(`npm publish ${pkg} ${FLAGS}`, (err, stdout) => {
if (stdout) { if (stdout) {
@ -96,8 +96,8 @@ async function publish(ignoreErrors = false) {
} }
} }
}); });
}); })
}); );
try { try {
await Queue(worker, PACKAGES, cpus().length); await Queue(worker, PACKAGES, cpus().length);