Skip to content

Commit 55d7166

Browse files
Copiloticlanton
andcommitted
Fix Windows path issue - use os.tmpdir() instead of hardcoded /tmp
Co-authored-by: iclanton <5010588+iclanton@users.noreply.github.com>
1 parent 78a8208 commit 55d7166

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

build-tests/rush-package-manager-integration-test/src/testNpmMode.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
22
// See LICENSE in the project root for license information.
33

4+
import * as os from 'node:os';
45
import * as path from 'node:path';
56

67
import type { ITerminal } from '@rushstack/terminal';
@@ -14,7 +15,7 @@ import { TestHelper } from './TestHelper';
1415
export async function testNpmModeAsync(terminal: ITerminal): Promise<void> {
1516
const helper: TestHelper = new TestHelper(terminal);
1617
// Use system temp directory to avoid rush init detecting parent rush.json
17-
const testRepoPath: string = path.join('/tmp', 'rush-package-manager-test', 'npm-test-repo');
18+
const testRepoPath: string = path.join(os.tmpdir(), 'rush-package-manager-test', 'npm-test-repo');
1819

1920
terminal.writeLine('==========================================');
2021
terminal.writeLine('Rush NPM Mode Integration Test');

build-tests/rush-package-manager-integration-test/src/testYarnMode.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
22
// See LICENSE in the project root for license information.
33

4+
import * as os from 'node:os';
45
import * as path from 'node:path';
56

67
import type { ITerminal } from '@rushstack/terminal';
@@ -14,7 +15,7 @@ import { TestHelper } from './TestHelper';
1415
export async function testYarnModeAsync(terminal: ITerminal): Promise<void> {
1516
const helper: TestHelper = new TestHelper(terminal);
1617
// Use system temp directory to avoid rush init detecting parent rush.json
17-
const testRepoPath: string = path.join('/tmp', 'rush-package-manager-test', 'yarn-test-repo');
18+
const testRepoPath: string = path.join(os.tmpdir(), 'rush-package-manager-test', 'yarn-test-repo');
1819

1920
terminal.writeLine('==========================================');
2021
terminal.writeLine('Rush Yarn Mode Integration Test');

0 commit comments

Comments
 (0)