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

Add small bit of extra node.log to exec node to make it obvious what it is doing.

This commit is contained in:
Dave C-J 2014-01-27 19:24:15 +00:00
parent 3a2ed39b51
commit 3dee0f1e20

View File

@ -34,7 +34,7 @@ function ExecNode(n) {
// then prepend with the msg.payload
var arg = node.append.split(",");
if (msg.payload != " ") { arg.unshift(msg.payload); }
//console.log(arg);
node.log(node.cmd+" "+arg);
var ex = spawn(node.cmd,arg);
ex.stdout.on('data', function (data) {
//console.log('[exec] stdout: ' + data);
@ -55,6 +55,7 @@ function ExecNode(n) {
else {
var cl = node.cmd+" "+msg.payload+" "+node.append;
node.log(cl);
var child = exec(cl, function (error, stdout, stderr) {
msg.payload = stdout;
var msg2 = {payload:stderr};