Exit with non-0 rc if admin command fails

This commit is contained in:
Nick O'Leary 2020-06-04 11:02:48 +01:00
parent f7e7f7ed01
commit c048b1a25b
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
3 changed files with 5 additions and 3 deletions

View File

@ -56,7 +56,7 @@
"mqtt": "2.18.8",
"multer": "1.4.2",
"mustache": "4.0.1",
"node-red-admin": "^0.2.4",
"node-red-admin": "^0.2.5",
"node-red-node-rbe": "^0.2.9",
"node-red-node-sentiment": "^0.1.6",
"node-red-node-tail": "^0.1.0",

View File

@ -39,7 +39,7 @@
"bcryptjs": "2.4.3",
"express": "4.17.1",
"fs-extra": "8.1.0",
"node-red-admin": "^0.2.4",
"node-red-admin": "^0.2.5",
"node-red-node-rbe": "^0.2.9",
"node-red-node-tail": "^0.1.0",
"nopt": "4.0.3",

View File

@ -17,7 +17,9 @@
if (process.argv[2] === 'admin') {
try {
require("node-red-admin")(process.argv.slice(3))
require("node-red-admin")(process.argv.slice(3)).catch(err => {
process.exit(1);
})
} catch(err) {
console.log(err)
}