From 2cd624beaa3832d3fe362f73f30d69a0281a5c77 Mon Sep 17 00:00:00 2001 From: Phil Booth Date: Thu, 28 Mar 2019 19:10:26 +0000 Subject: [PATCH] fix(scripts): exit cleanly from write-emails-to-disk script --- scripts/write-emails-to-disk.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/write-emails-to-disk.js b/scripts/write-emails-to-disk.js index 38a4a10c..95ba92b4 100755 --- a/scripts/write-emails-to-disk.js +++ b/scripts/write-emails-to-disk.js @@ -80,6 +80,11 @@ require('../lib/senders/translator')(config.i18n.supportedLanguages, config.i18n }) .then(() => { console.info('done'); + process.exit(0); + }) + .catch(err => { + console.error(err.stack); + process.exit(1); }); function getEmailOutputPath(subject, extension) {