Make scripts terminate with a non-zero error code upon failure.

This commit is contained in:
László Monda
2019-07-20 13:04:11 +02:00
parent 7c6da6c4e6
commit ffcfce04d5
3 changed files with 6 additions and 0 deletions

View File

@@ -1,6 +1,8 @@
#!/usr/bin/env node
const uhk = require('./uhk');
process.on('unhandledRejection', e => {throw e});
(async function() {
const device = uhk.getUhkDevice();
uhk.applyConfig(device);