@node-red/nodes 3.1.8 → 3.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -378,7 +378,7 @@
|
|
|
378
378
|
return { id: id, label: RED.nodes.workspace(id).label } //flow id + name
|
|
379
379
|
} else {
|
|
380
380
|
const instanceNode = RED.nodes.node(id)
|
|
381
|
-
const pathLabel = (instanceNode.name || RED.nodes.subflow(instanceNode.type.substring(8)).
|
|
381
|
+
const pathLabel = (instanceNode.name || RED.nodes.subflow(instanceNode.type.substring(8))?.name || instanceNode.type)
|
|
382
382
|
return { id: id, label: pathLabel }
|
|
383
383
|
}
|
|
384
384
|
})
|
package/core/function/90-exec.js
CHANGED
|
@@ -20,6 +20,7 @@ module.exports = function(RED) {
|
|
|
20
20
|
var exec = require('child_process').exec;
|
|
21
21
|
var fs = require('fs');
|
|
22
22
|
var isUtf8 = require('is-utf8');
|
|
23
|
+
const isWindows = process.platform === 'win32'
|
|
23
24
|
|
|
24
25
|
function ExecNode(n) {
|
|
25
26
|
RED.nodes.createNode(this,n);
|
|
@@ -85,9 +86,12 @@ module.exports = function(RED) {
|
|
|
85
86
|
}
|
|
86
87
|
});
|
|
87
88
|
var cmd = arg.shift();
|
|
89
|
+
// Since 18.20.2/20.12.2, it is invalid to call spawn on Windows with a .bat/.cmd file
|
|
90
|
+
// without using shell: true.
|
|
91
|
+
const opts = isWindows ? { ...node.spawnOpt, shell: true } : node.spawnOpt
|
|
88
92
|
/* istanbul ignore else */
|
|
89
93
|
node.debug(cmd+" ["+arg+"]");
|
|
90
|
-
child = spawn(cmd,arg,
|
|
94
|
+
child = spawn(cmd,arg,opts);
|
|
91
95
|
node.status({fill:"blue",shape:"dot",text:"pid:"+child.pid});
|
|
92
96
|
var unknownCommand = (child.pid === undefined);
|
|
93
97
|
if (node.timer !== 0) {
|