From 6e5bab1a1d158cff84351104e1654439261ed2e6 Mon Sep 17 00:00:00 2001 From: Lukasz Ostrowski Date: Tue, 17 Jul 2018 17:11:19 +0200 Subject: [PATCH] Ensured process exits after static export (#4747) (#4749) Fixes [this issue](https://github.com/zeit/next.js/issues/4747) I don't know what is the reason why the process does not finish, because it can be reproduced in this repo in many environments (my local mac os and Netlify pipeline). However, it fixes the problem and it's 100% safe. --- bin/next-export | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/next-export b/bin/next-export index c9ac30b3..06d825b7 100755 --- a/bin/next-export +++ b/bin/next-export @@ -57,6 +57,10 @@ const options = { outdir: argv.outdir ? resolve(argv.outdir) : resolve(dir, 'out') } -exportApp(dir, options).catch((err) => { - printAndExit(err) -}) +exportApp(dir, options) + .then(() => { + printAndExit('Export successful', 0) + }) + .catch((err) => { + printAndExit(err) + })