Throw an error instead of using process.exit

This commit is contained in:
Jeroen Engels 2021-10-01 23:18:34 +02:00
parent c33c280e09
commit 4845e5d9ac

View File

@ -76,7 +76,7 @@ export async function run(
if (jsSource != '') {
log('Compiled, optimizing JS...');
} else {
process.exit(1)
throw new Error('An error occurred when compiling your application with Elm 0.19.1.');
}
} else {
throw new Error('Please provide a path to an Elm file.\n' + program.helpInformation());