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:
parent
2954ae917b
commit
1c9b5dfd00
@ -64,7 +64,9 @@ module.exports = function(RED) {
|
|||||||
//console.log('[exec] result: ' + code);
|
//console.log('[exec] result: ' + code);
|
||||||
delete node.activeProcesses[ex.pid];
|
delete node.activeProcesses[ex.pid];
|
||||||
msg.payload = code;
|
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]);
|
node.send([null,null,msg]);
|
||||||
});
|
});
|
||||||
ex.on('error', function (code) {
|
ex.on('error', function (code) {
|
||||||
|
Loading…
Reference in New Issue
Block a user