From f137b3a09e9ba9c0e8ebb62c0792ad0f59f7b735 Mon Sep 17 00:00:00 2001 From: Rhys Arkins Date: Tue, 16 Jan 2024 15:38:19 +0100 Subject: [PATCH] fix(npm): pass through COREPACK env to child process (#26664) --- lib/util/exec/env.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/util/exec/env.ts b/lib/util/exec/env.ts index 0c9c7ef23f38a1c..cf53afd966df60a 100644 --- a/lib/util/exec/env.ts +++ b/lib/util/exec/env.ts @@ -24,6 +24,17 @@ const basicEnvVars = [ 'PROGRAMFILES(X86)', 'APPDATA', 'LOCALAPPDATA', + // Corepack: https://github.com/nodejs/corepack + 'COREPACK_DEFAULT_TO_LATEST', + 'COREPACK_ENABLE_NETWORK', + 'COREPACK_ENABLE_STRICT', + 'COREPACK_ENABLE_PROJECT_SPEC', + 'COREPACK_HOME', + 'COREPACK_NPM_REGISTRY', + 'COREPACK_NPM_TOKEN', + 'COREPACK_NPM_USERNAME', + 'COREPACK_NPM_PASSWORD', + 'COREPACK_ROOT', ]; export function getChildProcessEnv(