From 370715cace3df6f888206fb4df57b4defa3075f4 Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Wed, 3 Mar 2021 09:02:31 +0100
Subject: [PATCH] fix: throw for config file TypeError

---
 lib/config/file.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/config/file.ts b/lib/config/file.ts
index 7eb13744f9..f6b59fce0f 100644
--- a/lib/config/file.ts
+++ b/lib/config/file.ts
@@ -15,7 +15,7 @@ export function getConfig(env: NodeJS.ProcessEnv): GlobalConfig {
     config = require(configFile);
   } catch (err) {
     // istanbul ignore if
-    if (err instanceof SyntaxError) {
+    if (err instanceof SyntaxError || err instanceof TypeError) {
       logger.fatal(`Could not parse config file \n ${err.stack}`);
       process.exit(1);
     }
-- 
GitLab