1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

add status to exec spawn mode

This commit is contained in:
Dave Conway-Jones 2016-04-10 12:21:07 +01:00
parent 2954ae917b
commit 1c9b5dfd00

View File

@ -64,7 +64,9 @@ module.exports = function(RED) {
//console.log('[exec] result: ' + code);
delete node.activeProcesses[ex.pid];
msg.payload = code;
node.status({});
if (code === 0) { node.status({}); }
else if (code < 0) { node.status({fill:"red",shape:"dot",text:"rc: "+code}); }
else { node.status({fill:"yellow",shape:"dot",text:"rc: "+code}); }
node.send([null,null,msg]);
});
ex.on('error', function (code) {