@node-red/nodes 3.1.7 → 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)).name)
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
  })
@@ -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,node.spawnOpt);
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) {
@@ -1,3 +1,3 @@
1
1
  <script type="text/html" data-help-name="global-config">
2
2
  <p>大域的なフローの設定を保持するノード。大域的な環境変数の定義を含みます。</p>
3
- </script>p
3
+ </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node-red/nodes",
3
- "version": "3.1.7",
3
+ "version": "3.1.9",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",