Skip to content

Commit 6ade441

Browse files
committed
fixup! test: use TEST_TMPDIR as fallback for E2E temporary directory
1 parent 858ea4d commit 6ade441

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

‎tests/e2e/utils/process.ts‎

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -441,19 +441,13 @@ export function silentGit(...args: string[]) {
441441
* registry (not the test runner or standard global node_modules).
442442
*/
443443
export async function launchTestProcess(entry: string, ...args: any[]): Promise<void> {
444-
// NOTE: do NOT use the bazel TEST_TMPDIR. When sandboxing is not enabled the
445-
// TEST_TMPDIR is not sandboxed and has symlinks into the src dir in a
446-
// parent directory. Symlinks into the src dir will include package.json,
447-
// .git and other files/folders that may effect e2e tests.
448-
449444
const tempRoot: string = getGlobalVariable('tmp-root');
450-
const TEMP = process.env.TEMP ?? process.env.TMPDIR ?? tempRoot;
451445

452446
// Extract explicit environment variables for the test process.
453447
const env: NodeJS.ProcessEnv = {
454-
TEMP,
455-
TMPDIR: TEMP,
456-
HOME: TEMP,
448+
TEMP: tempRoot,
449+
TMPDIR: tempRoot,
450+
HOME: tempRoot,
457451

458452
// Use BAZEL_TARGET as a metadata variable to show it is a
459453
// process managed by bazel
@@ -469,7 +463,7 @@ export async function launchTestProcess(entry: string, ...args: any[]): Promise<
469463
// non angular-cli paths such as /usr/bin for generic commands.
470464
env.PATH = process.env
471465
.PATH!.split(delimiter)
472-
.filter((p) => p.startsWith(tempRoot) || p.startsWith(TEMP) || !p.includes('angular-cli'))
466+
.filter((p) => p.startsWith(tempRoot) || !p.includes('angular-cli'))
473467
.join(delimiter);
474468

475469
const testProcessArgs = [

0 commit comments

Comments
 (0)