dsh-pocket 1.13.4 → 1.13.5
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/index.js +3 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -168,6 +168,9 @@ function performUpdate(profile, { timeoutMs = 180_000 } = {}) {
|
|
|
168
168
|
return new Promise((resolve) => {
|
|
169
169
|
const child = spawn('dsh', ['plugin', '--profile', profile, 'update', 'dsh-pocket', '--latest', '-w'], {
|
|
170
170
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
171
|
+
// Windows 上裸 spawn('dsh') 解析到无扩展名 POSIX shim → ENOENT;
|
|
172
|
+
// Node 22+ 直接 spawn .cmd 会 EINVAL(CVE-2024-27980),必须走 shell(PR #54)
|
|
173
|
+
shell: process.platform === 'win32',
|
|
171
174
|
});
|
|
172
175
|
let out = '';
|
|
173
176
|
const onData = (c) => { out += String(c); if (out.length > 4000) out = out.slice(-4000); };
|
package/package.json
CHANGED