@wrongstack/tools 0.269.0 → 0.270.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/dist/bash.js +11 -2
- package/dist/bash.js.map +1 -1
- package/dist/builtin.js +11 -2
- package/dist/builtin.js.map +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/pack.js +11 -2
- package/dist/pack.js.map +1 -1
- package/package.json +2 -2
package/dist/pack.js
CHANGED
|
@@ -1179,8 +1179,7 @@ var bashTool = {
|
|
|
1179
1179
|
// Windows children survive parent exit either way. POSIX keeps
|
|
1180
1180
|
// detached for the process-group kill semantics.
|
|
1181
1181
|
detached: !isWin3,
|
|
1182
|
-
windowsHide: true
|
|
1183
|
-
signal: opts.signal
|
|
1182
|
+
windowsHide: true
|
|
1184
1183
|
});
|
|
1185
1184
|
const pid2 = child2.pid;
|
|
1186
1185
|
if (typeof pid2 === "number") {
|
|
@@ -1208,7 +1207,17 @@ var bashTool = {
|
|
|
1208
1207
|
};
|
|
1209
1208
|
child2.stdout?.on("data", onBgData);
|
|
1210
1209
|
child2.stderr?.on("data", onBgData);
|
|
1210
|
+
const cleanupBackground = () => {
|
|
1211
|
+
child2.stdout?.off("data", onBgData);
|
|
1212
|
+
child2.stderr?.off("data", onBgData);
|
|
1213
|
+
};
|
|
1214
|
+
child2.on("error", () => {
|
|
1215
|
+
cleanupBackground();
|
|
1216
|
+
if (typeof pid2 === "number") registry.unregister(pid2);
|
|
1217
|
+
registry.afterCall(Date.now() - startedAt, true, bypassBreaker);
|
|
1218
|
+
});
|
|
1211
1219
|
child2.on("close", () => {
|
|
1220
|
+
cleanupBackground();
|
|
1212
1221
|
registry.afterCall(Date.now() - startedAt, false, bypassBreaker);
|
|
1213
1222
|
});
|
|
1214
1223
|
if (typeof pid2 === "number") child2.unref();
|