From 8b612bd22e2d6c837f5cad0ccfbd4b334a11f734 Mon Sep 17 00:00:00 2001 From: Sergii Bomko Date: Thu, 30 Apr 2020 22:51:51 +0300 Subject: [PATCH] handle process exit --- index.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index 1b5fbeb7..570739f8 100644 --- a/index.js +++ b/index.js @@ -1,8 +1,5 @@ const run = require('./runner'); -try { - run(); - process.exit(0); -} catch (_) { - process.exit(1); -} \ No newline at end of file +run() + .then(() => process.exit(0)) + .catch(() => process.exit(1)); \ No newline at end of file