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