()
| 35 | * Strips vars that could redirect imports or installs to the user's system Python. |
| 36 | */ |
| 37 | export function cleanPythonEnv(): NodeJS.ProcessEnv { |
| 38 | const { |
| 39 | PYTHONHOME, PYTHONPATH, PYTHONSTARTUP, PYTHONUSERBASE, |
| 40 | PIP_USER, PIP_TARGET, PIP_PREFIX, PIP_REQUIRE_VIRTUALENV, |
| 41 | VIRTUAL_ENV, CONDA_PREFIX, |
| 42 | ...rest |
| 43 | } = process.env |
| 44 | void PYTHONHOME; void PYTHONPATH; void PYTHONSTARTUP; void PYTHONUSERBASE |
| 45 | void PIP_USER; void PIP_TARGET; void PIP_PREFIX; void PIP_REQUIRE_VIRTUALENV |
| 46 | void VIRTUAL_ENV; void CONDA_PREFIX |
| 47 | return rest |
| 48 | } |
| 49 | |
| 50 | // ─── Path helpers ───────────────────────────────────────────────────────────── |
| 51 |
no outgoing calls
no test coverage detected