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

ensure clone msg for multi line output

to close #642
This commit is contained in:
Dave Conway-Jones 2020-03-31 17:07:22 +01:00
parent a57de3d8f2
commit 3087e8e2a1
No known key found for this signature in database
GPG Key ID: 302A6725C594817F
2 changed files with 5 additions and 3 deletions

View File

@ -60,8 +60,10 @@ module.exports = function(RED) {
line += data.toString();
var bits = line.split("\n");
while (bits.length > 1) {
lastmsg.payload = bits.shift();
node.send([lastmsg,null,null]);
var m = RED.util.cloneMessage(lastmsg);
m.payload = bits.shift();
console.log(m);
node.send([m,null,null]);
}
line = bits[0];
}

View File

@ -1,6 +1,6 @@
{
"name" : "node-red-node-daemon",
"version" : "0.0.25",
"version" : "0.0.26",
"description" : "A Node-RED node that runs and monitors a long running system command.",
"dependencies" : {
},