@oh-my-pi/pi-utils 14.7.4 → 14.7.6
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/package.json +2 -2
- package/src/procmgr.ts +15 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-utils",
|
|
4
|
-
"version": "14.7.
|
|
4
|
+
"version": "14.7.6",
|
|
5
5
|
"description": "Shared utilities for pi packages",
|
|
6
6
|
"homepage": "https://github.com/can1357/oh-my-pi",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/bun": "^1.3.13",
|
|
41
|
-
"@oh-my-pi/pi-natives": "14.7.
|
|
41
|
+
"@oh-my-pi/pi-natives": "14.7.6"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
44
|
"bun": ">=1.3.7"
|
package/src/procmgr.ts
CHANGED
|
@@ -11,9 +11,22 @@ export interface ShellConfig {
|
|
|
11
11
|
env: Record<string, string>;
|
|
12
12
|
prefix: string | undefined;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
14
|
let cachedShellConfig: ShellConfig | null = null;
|
|
16
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Strip disabled macOS malloc-stack-logging vars from `process.env` in place.
|
|
18
|
+
*
|
|
19
|
+
* macOS leaves `MallocStackLogging=0` (or similar) inherited by debug-attached
|
|
20
|
+
* shells. Bun's libc init then prints `MallocStackLogging: can't turn off
|
|
21
|
+
* malloc stack logging because it was not enabled.` to stderr for every
|
|
22
|
+
* subprocess. Scrubbing once at startup means every child we spawn — bash,
|
|
23
|
+
* bun subagents, plugin installs, ptree commands — inherits a clean env.
|
|
24
|
+
*/
|
|
25
|
+
export function scrubProcessEnv(): void {
|
|
26
|
+
delete process.env.MallocStackLogging;
|
|
27
|
+
delete process.env.MallocStackLoggingNoCompact;
|
|
28
|
+
}
|
|
29
|
+
|
|
17
30
|
/**
|
|
18
31
|
* Check if a shell binary is executable.
|
|
19
32
|
*/
|
|
@@ -39,7 +52,7 @@ function buildSpawnEnv(shell: string): Record<string, string> {
|
|
|
39
52
|
OMPCODE: "1",
|
|
40
53
|
CLAUDECODE: "1",
|
|
41
54
|
...(noCI ? {} : { CI: "true" }),
|
|
42
|
-
}
|
|
55
|
+
} as Record<string, string>;
|
|
43
56
|
}
|
|
44
57
|
|
|
45
58
|
/**
|