clawmoney 0.15.42 → 0.15.43
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/dist/utils/awal.js +7 -2
- package/package.json +1 -1
package/dist/utils/awal.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
|
+
// Windows resolves .cmd / .bat launchers only through the shell;
|
|
3
|
+
// POSIX (macOS/Linux) `spawn` walks PATH on its own and prints a
|
|
4
|
+
// DEP0190 deprecation warning when shell:true is combined with
|
|
5
|
+
// argument arrays. Keep shell:true only where we actually need it.
|
|
6
|
+
const USE_SHELL = process.platform === 'win32';
|
|
2
7
|
/**
|
|
3
8
|
* Execute an awal CLI command and parse the JSON output.
|
|
4
9
|
* Always appends --json flag for machine-readable output.
|
|
@@ -9,7 +14,7 @@ export async function awalExec(args) {
|
|
|
9
14
|
return new Promise((resolve, reject) => {
|
|
10
15
|
const child = spawn('npx', ['awal', ...finalArgs], {
|
|
11
16
|
stdio: ['inherit', 'pipe', 'pipe'],
|
|
12
|
-
shell:
|
|
17
|
+
shell: USE_SHELL,
|
|
13
18
|
});
|
|
14
19
|
let stdout = '';
|
|
15
20
|
let stderr = '';
|
|
@@ -64,7 +69,7 @@ export async function awalExecInteractive(args) {
|
|
|
64
69
|
return new Promise((resolve, reject) => {
|
|
65
70
|
const child = spawn('npx', ['awal', ...finalArgs], {
|
|
66
71
|
stdio: ['inherit', 'pipe', 'pipe'],
|
|
67
|
-
shell:
|
|
72
|
+
shell: USE_SHELL,
|
|
68
73
|
});
|
|
69
74
|
let stdout = '';
|
|
70
75
|
let stderr = '';
|