mirror of https://github.com/node-red/node-red.git
Exec node - don't append msg.payload to command by default (#2818)
* exec change default to not append payloadpull/2819/head^2
parent
ccfde84769
commit
aa47bae2ad
|
@ -52,7 +52,7 @@
|
|||
color:"darksalmon",
|
||||
defaults: {
|
||||
command: {value:""},
|
||||
addpay: {value:true},
|
||||
addpay: {value:false},
|
||||
append: {value:""},
|
||||
useSpawn: {value:"false"},
|
||||
timer: {value:""},
|
||||
|
|
|
@ -31,12 +31,12 @@ module.exports = function(RED) {
|
|||
this.timer = Number(n.timer || 0)*1000;
|
||||
this.activeProcesses = {};
|
||||
this.oldrc = (n.oldrc || false).toString();
|
||||
this.execOpt = {encoding:'binary', maxBuffer:10000000};
|
||||
this.execOpt = {encoding:'binary', maxBuffer:10000000};
|
||||
var node = this;
|
||||
|
||||
if (process.platform === 'linux' && fs.existsSync('/bin/bash')) { node.execOpt.shell = '/bin/bash'; }
|
||||
|
||||
var cleanup = function(p) {
|
||||
if (process.platform === 'linux' && fs.existsSync('/bin/bash')) { node.execOpt.shell = '/bin/bash'; }
|
||||
|
||||
var cleanup = function(p) {
|
||||
node.activeProcesses[p].kill();
|
||||
//node.status({fill:"red",shape:"dot",text:"timeout"});
|
||||
//node.error("Exec node timeout");
|
||||
|
|
Loading…
Reference in New Issue