log error and exit

This commit is contained in:
Dragan Filipovic 2023-01-02 17:57:33 +01:00
parent 9aabe10cb3
commit b8f0959bb4

View file

@ -38,9 +38,10 @@ const run = async () => {
}; };
run() run()
.then(() => { .then((data) => {
console.log('DONE'); console.log('DONE', data);
}) })
.catch(() => { .catch((error) => {
console.error('ERROR'); console.error('ERROR', error.message);
process.exit(1);
}); });