From 3e258d611a65454f8e12461aeae6d181e6e26cb7 Mon Sep 17 00:00:00 2001 From: lucas Date: Mon, 6 Jan 2025 21:45:42 +0000 Subject: [PATCH] fix path on install script --- test/scripts/check-siblingsHelper.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/scripts/check-siblingsHelper.ts b/test/scripts/check-siblingsHelper.ts index 77c9196a..f4764c41 100644 --- a/test/scripts/check-siblingsHelper.ts +++ b/test/scripts/check-siblingsHelper.ts @@ -101,14 +101,18 @@ export function InstallSDK(pkgMnger: string, args: ReadonlyArray, rootPa fs.writeFileSync(outputStream, `using package manager ${pkgMnger} with the following args: ${args.join(' ')}`); + const newEnv = { + PATH: HideGlobalYarnPath(), + npm_package_scripts_test_e2e: process.env.npm_package_scripts_test_e2e, + ...nodePatch, + INIT_CWD: rootPath // Override INIT_CWD to match the desired root path + }; + const result = spawnSync(pkgMnger, args, { cwd: rootPath, stdio: ['inherit', outputStream, outputStream], // Ensure output is in readable string format env: { - // Clear env to avoid contamination with root folder. - npm_package_scripts_test_e2e: process.env.npm_package_scripts_test_e2e, - ...nodePatch, - INIT_CWD: rootPath // Override INIT_CWD to match the desired root path + ...newEnv }, }); fs.closeSync(outputStream);