Make scripts terminate with a non-zero error code upon failure.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
const uhk = require('./uhk');
|
||||
const device = uhk.getUhkDevice();
|
||||
|
||||
process.on('unhandledRejection', e => {throw e});
|
||||
|
||||
(async function() {
|
||||
const operationArg = process.argv[2];
|
||||
const operation = uhk.eepromOperations[operationArg];
|
||||
|
||||
@@ -3,6 +3,8 @@ const fs = require('fs');
|
||||
const program = require('commander');
|
||||
const uhk = require('./uhk');
|
||||
|
||||
process.on('unhandledRejection', e => {throw e});
|
||||
|
||||
(async function() {
|
||||
program
|
||||
.usage(`configPath`)
|
||||
|
||||
Reference in New Issue
Block a user