mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
moved check for shell
This commit is contained in:
parent
d25e027201
commit
d9548a2891
@ -31,10 +31,10 @@ 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};
|
||||
var node = this;
|
||||
|
||||
var execOpt = {encoding:'binary', maxBuffer:10000000};
|
||||
if (process.platform === 'linux' && fs.existsSync('/bin/bash')) { execOpt.shell = '/bin/bash'; }
|
||||
if (process.platform === 'linux' && fs.existsSync('/bin/bash')) { node.execOpt.shell = '/bin/bash'; }
|
||||
|
||||
var cleanup = function(p) {
|
||||
node.activeProcesses[p].kill();
|
||||
@ -131,7 +131,7 @@ module.exports = function(RED) {
|
||||
if (node.append.trim() !== "") { cl += " "+node.append; }
|
||||
/* istanbul ignore else */
|
||||
if (RED.settings.verbose) { node.log(cl); }
|
||||
child = exec(cl, execOpt, function (error, stdout, stderr) {
|
||||
child = exec(cl, node.execOpt, function (error, stdout, stderr) {
|
||||
var msg2, msg3;
|
||||
delete msg.payload;
|
||||
if (stderr) {
|
||||
|
Loading…
Reference in New Issue
Block a user