From 0352aedd0de7b98d340efd515737cd4d62820791 Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
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 0c9c7ef23f..cf53afd966 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(
-- 
GitLab