From 95c72677a5884eb8aa2b869b8a499f41b9aaafc9 Mon Sep 17 00:00:00 2001
From: Alan Agius <alan.agius@betssongroup.com>
Date: Fri, 11 Jan 2019 08:30:38 +0100
Subject: [PATCH] build: terminate process with non zero error code when build
 fails

At the moment, error can be undefined sometimes which is causing the process not to be terminated with a non zero error code.
---
 bin/devkit-admin | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/devkit-admin b/bin/devkit-admin
index 45abb60cc6..f356b0d42e 100755
--- a/bin/devkit-admin
+++ b/bin/devkit-admin
@@ -68,7 +68,7 @@ try {
     .then(() => require(scriptPath).default(args, logger, cwd))
     .then(exitCode => process.exit(exitCode || 0))
     .catch(err => {
-      logger.fatal(err.stack);
+      logger.fatal(err && err.stack);
       process.exit(99);
     });
 } catch (err) {