Throw an error if outputFilePath is not defined

This commit is contained in:
Jeroen Engels 2021-10-01 23:46:13 +02:00
parent ac3d1349af
commit 07dd5d2fe9

View File

@ -19,6 +19,10 @@ export async function run(
}, },
log: (message?: any, ...optionalParams: any[]) => void log: (message?: any, ...optionalParams: any[]) => void
) { ) {
if (!options.outputFilePath) {
throw new Error('Missing an output file path');
}
const dirname = process.cwd(); const dirname = process.cwd();
let jsSource: string = ''; let jsSource: string = '';
let elmFilePath = undefined; let elmFilePath = undefined;