( agentEnv: Record<string, string>, parentEnv: NodeJS.ProcessEnv = process.env, )
| 16 | 'ELECTRON_RUN_AS_NODE', |
| 17 | ] as const; |
| 18 | |
| 19 | export function buildPtyWrapperEnv( |
| 20 | agentEnv: Record<string, string>, |
| 21 | parentEnv: NodeJS.ProcessEnv = process.env, |
| 22 | ): Record<string, string> { |
| 23 | const wrapperEnv = { ...agentEnv }; |
| 24 | for (const key of PTY_WRAPPER_ENV_KEYS) { |
| 25 | const value = parentEnv[key]; |
| 26 | if (value !== undefined) { |
| 27 | wrapperEnv[key] = value; |
| 28 | } |
| 29 | } |
| 30 | return wrapperEnv; |
| 31 | } |
| 32 | |
| 33 | const PTY_WRAPPER_SCRIPT = String.raw` |
no outgoing calls
no test coverage detected