mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Reduce logging for exec node
(can be re-enabled by using node -v red.js ... )
This commit is contained in:
parent
b54e9edfa6
commit
d9363f4974
@ -35,7 +35,7 @@ module.exports = function(RED) {
|
||||
var arg = [];
|
||||
if (node.append.length > 0) { arg = node.append.split(","); }
|
||||
if (msg.payload.trim() !== "") { arg.unshift(msg.payload); }
|
||||
node.log(node.cmd+" ["+arg+"]");
|
||||
if (RED.settings.verbose) { node.log(node.cmd+" ["+arg+"]"); }
|
||||
if (node.cmd.indexOf(" ") == -1) {
|
||||
var ex = spawn(node.cmd,arg);
|
||||
ex.stdout.on('data', function (data) {
|
||||
@ -62,7 +62,7 @@ module.exports = function(RED) {
|
||||
}
|
||||
else {
|
||||
var cl = node.cmd+" "+msg.payload+" "+node.append;
|
||||
node.log(cl);
|
||||
if (RED.settings.verbose) { node.log(cl); }
|
||||
var child = exec(cl, function (error, stdout, stderr) {
|
||||
msg.payload = stdout;
|
||||
var msg2 = {payload:stderr};
|
||||
|
Loading…
Reference in New Issue
Block a user