From afde42fcbe6be65013664a3dad275cfd82dd6483 Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Tue, 12 Jul 2022 11:12:22 +0900 Subject: [PATCH] Fix --- index.js | 2 +- test/postgrator-cli-tests.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 1dba1ee..ad6bb02 100755 --- a/index.js +++ b/index.js @@ -3,7 +3,7 @@ import { argv } from 'node:process'; import { run } from './lib/postgrator-cli.js'; // eslint-disable-line import/extensions -run(argv).catch((e) => { +await run(argv).catch((e) => { console.log(`Error: ${e.message}`); return Promise.reject(e); }); diff --git a/test/postgrator-cli-tests.js b/test/postgrator-cli-tests.js index 72ef088..a16d1db 100644 --- a/test/postgrator-cli-tests.js +++ b/test/postgrator-cli-tests.js @@ -532,7 +532,7 @@ buildTestsForOptions(options); // Run the tests console.log(`Running ${tests.length} tests`); -eachSeries(tests, (testFunc) => { +await eachSeries(tests, (testFunc) => { console.log = originalConsoleLog; log = ''; return testFunc();