Daemon node handle parameters with spaces

to close #754
This commit is contained in:
Dave Conway-Jones 2021-02-05 10:35:54 +00:00
parent bbf9a3b7e4
commit a57bf5383f
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF
2 changed files with 3 additions and 2 deletions

View File

@ -6,7 +6,8 @@ module.exports = function(RED) {
function DaemonNode(n) {
RED.nodes.createNode(this,n);
this.cmd = n.command;
this.args = n.args.trim().split(" ") || [];
//this.args = n.args.trim().split(" ") || [];
this.args = n.args.trim().match(/("[^"]*")|[^ ]+/g);
this.cr = n.cr;
this.op = n.op;
this.redo = n.redo;

View File

@ -1,6 +1,6 @@
{
"name" : "node-red-node-daemon",
"version" : "0.1.2",
"version" : "0.1.3",
"description" : "A Node-RED node that runs and monitors a long running system command.",
"dependencies" : {
},