mirror of
https://github.com/mdgriffith/elm-optimize-level-2.git
synced 2024-11-29 12:46:32 +03:00
Throw an error when input is not a JS/Elm file
This commit is contained in:
parent
6e36e78637
commit
c33c280e09
@ -79,9 +79,7 @@ export async function run(
|
|||||||
process.exit(1)
|
process.exit(1)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.error('Please provide a path to an Elm file.');
|
throw new Error('Please provide a path to an Elm file.\n' + program.helpInformation());
|
||||||
program.outputHelp();
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (jsSource != '') {
|
if (jsSource != '') {
|
||||||
const transformed = await Transform.transform(
|
const transformed = await Transform.transform(
|
||||||
|
Loading…
Reference in New Issue
Block a user