Throw an error when input is not a JS/Elm file

This commit is contained in:
Jeroen Engels 2021-10-01 23:14:26 +02:00
parent 6e36e78637
commit c33c280e09

View File

@ -79,9 +79,7 @@ export async function run(
process.exit(1)
}
} else {
console.error('Please provide a path to an Elm file.');
program.outputHelp();
return;
throw new Error('Please provide a path to an Elm file.\n' + program.helpInformation());
}
if (jsSource != '') {
const transformed = await Transform.transform(