Skip to content

Commit bdefaf3

Browse files
committed
Install rush and package managers in a node version-specific folder.
1 parent 237e24e commit bdefaf3

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎apps/rush-lib/src/api/RushConfiguration.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ export class RushConfiguration {
799799
this._yarnCacheFolder = path.resolve(path.join(this._commonTempFolder, 'yarn-cache'));
800800

801801
this._changesFolder = path.join(this._commonFolder, RushConstants.changeFilesFolderName);
802-
this._rushUserFolder = path.join(Utilities.getHomeDirectory(), '.rush');
802+
this._rushUserFolder = path.join(Utilities.getHomeDirectory(), '.rush', `node-${process.version}`);
803803

804804
this._rushLinkJsonFilename = path.join(this._commonTempFolder, 'rush-link.json');
805805

‎apps/rush/src/RushVersionSelector.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import * as semver from 'semver';
77
import { LockFile } from '@microsoft/node-core-library';
88
import { Utilities } from '@microsoft/rush-lib/lib/utilities/Utilities';
99
import { _LastInstallFlag } from '@microsoft/rush-lib';
10+
1011
import { RushCommandSelector } from './RushCommandSelector';
1112
import { MinimalRushConfiguration } from './MinimalRushConfiguration';
1213

@@ -25,7 +26,7 @@ export class RushVersionSelector {
2526
configuration: MinimalRushConfiguration | undefined): Promise<void> {
2627

2728
const isLegacyRushVersion: boolean = semver.lt(version, '4.0.0');
28-
const expectedRushPath: string = path.join(this._rushDirectory, `rush-${version}`);
29+
const expectedRushPath: string = path.join(this._rushDirectory, `node-${process.version}`, `rush-${version}`);
2930

3031
const installMarker: _LastInstallFlag = new _LastInstallFlag(
3132
expectedRushPath,

0 commit comments

Comments
 (0)