From c048b1a25b36040f169f443701b9a0dde2f57914 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Thu, 4 Jun 2020 11:02:48 +0100 Subject: [PATCH] Exit with non-0 rc if admin command fails --- package.json | 2 +- packages/node_modules/node-red/package.json | 2 +- packages/node_modules/node-red/red.js | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 8015ea9a1..31a618bb9 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/packages/node_modules/node-red/package.json b/packages/node_modules/node-red/package.json index 7a1555abf..ac949a11f 100644 --- a/packages/node_modules/node-red/package.json +++ b/packages/node_modules/node-red/package.json @@ -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", diff --git a/packages/node_modules/node-red/red.js b/packages/node_modules/node-red/red.js index db79294a4..0a7d8258d 100755 --- a/packages/node_modules/node-red/red.js +++ b/packages/node_modules/node-red/red.js @@ -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) }