From 07dd5d2fe9438f3683af344da69b501389d0420d Mon Sep 17 00:00:00 2001 From: Jeroen Engels Date: Fri, 1 Oct 2021 23:46:13 +0200 Subject: [PATCH] Throw an error if outputFilePath is not defined --- src/run.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/run.ts b/src/run.ts index 42b5281..4d20a62 100644 --- a/src/run.ts +++ b/src/run.ts @@ -19,6 +19,10 @@ export async function run( }, log: (message?: any, ...optionalParams: any[]) => void ) { + if (!options.outputFilePath) { + throw new Error('Missing an output file path'); + } + const dirname = process.cwd(); let jsSource: string = ''; let elmFilePath = undefined;