Skip to content

Commit a57bf53

Browse files
author
Dave Conway-Jones
committed
Daemon node handle parameters with spaces
to close #754
1 parent bbf9a3b commit a57bf53

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

utility/daemon/daemon.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ module.exports = function(RED) {
66
function DaemonNode(n) {
77
RED.nodes.createNode(this,n);
88
this.cmd = n.command;
9-
this.args = n.args.trim().split(" ") || [];
9+
//this.args = n.args.trim().split(" ") || [];
10+
this.args = n.args.trim().match(/("[^"]*")|[^ ]+/g);
1011
this.cr = n.cr;
1112
this.op = n.op;
1213
this.redo = n.redo;

utility/daemon/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name" : "node-red-node-daemon",
3-
"version" : "0.1.2",
3+
"version" : "0.1.3",
44
"description" : "A Node-RED node that runs and monitors a long running system command.",
55
"dependencies" : {
66
},

0 commit comments

Comments
 (0)