Skip to content

Commit

Permalink
fix path on install script
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-zimerman committed Jan 6, 2025
1 parent 47eeac8 commit 3e258d6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/scripts/check-siblingsHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,18 @@ export function InstallSDK(pkgMnger: string, args: ReadonlyArray<string>, 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);
Expand Down

0 comments on commit 3e258d6

Please sign in to comment.