@node-red/util 4.1.0-beta.2 → 4.1.0
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.
- package/lib/exec.js +9 -1
- package/package.json +1 -1
package/lib/exec.js
CHANGED
|
@@ -57,7 +57,15 @@ module.exports = {
|
|
|
57
57
|
return new Promise((resolve, reject) => {
|
|
58
58
|
let stdout = "";
|
|
59
59
|
let stderr = "";
|
|
60
|
-
|
|
60
|
+
let child
|
|
61
|
+
if (args && options.shell) {
|
|
62
|
+
// If we are using a shell, we need to join the args into a single string
|
|
63
|
+
// as passing a separate array of args is deprecated in Node 24
|
|
64
|
+
command = [command].concat(args).join(" ");
|
|
65
|
+
child = child_process.spawn(command, options)
|
|
66
|
+
} else {
|
|
67
|
+
child = child_process.spawn(command, args, options);
|
|
68
|
+
}
|
|
61
69
|
child.stdout.on('data', (data) => {
|
|
62
70
|
const str = ""+data;
|
|
63
71
|
stdout += str;
|