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