From 66f3fa398685b83ef089532af3de67cc82d7b3ac Mon Sep 17 00:00:00 2001 From: Nick Darvey Date: Thu, 20 Jan 2022 16:40:00 +1100 Subject: [PATCH] chore: Throw parse error instead of continuing --- src/get-env-vars.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/get-env-vars.ts b/src/get-env-vars.ts index f89f847..69953b3 100644 --- a/src/get-env-vars.ts +++ b/src/get-env-vars.ts @@ -103,6 +103,12 @@ export async function getRCFile ( } throw new Error(errorText) } + if (e.name === 'ParseError') { + if (verbose === true) { + console.info(e.message); + } + throw new Error(e.message); + } } }