@@ -187,6 +187,7 @@ export class RushConfiguration {
187187 private _tempShrinkwrapFilename : string ;
188188 private _tempShrinkwrapPreinstallFilename : string ;
189189 private _rushUserFolder : string ;
190+ private _versionIndependentRushUserFolder : string ;
190191 private _rushLinkJsonFilename : string ;
191192 private _currentVariantJsonFilename : string ;
192193 private _packageManagerToolVersion : string ;
@@ -565,13 +566,21 @@ export class RushConfiguration {
565566 }
566567
567568 /**
568- * The absolute path to Rush's storage in the home directory for the current user. On Windows,
569- * it would be something like `C:\Users\YourName\.rush`.
569+ * The absolute path to Rush's storage in the home directory for the current user and node version.
570+ * On Windows, it would be something like `C:\Users\YourName\.rush\node-v4.5.6\ `.
570571 */
571572 public get rushUserFolder ( ) : string {
572573 return this . _rushUserFolder ;
573574 }
574575
576+ /**
577+ * The absolute path to Rush's storage in the home directory for the current user, independent of node version.
578+ * On Windows, it would be something like `C:\Users\YourName\.rush\`.
579+ */
580+ public get versionIndependentRushUserFolder ( ) : string {
581+ return this . _versionIndependentRushUserFolder ;
582+ }
583+
575584 /**
576585 * The filename of the build dependency data file. By default this is
577586 * called 'rush-link.json' resides in the Rush common folder.
@@ -908,7 +917,8 @@ export class RushConfiguration {
908917 this . _yarnCacheFolder = path . resolve ( path . join ( this . _commonTempFolder , 'yarn-cache' ) ) ;
909918
910919 this . _changesFolder = path . join ( this . _commonFolder , RushConstants . changeFilesFolderName ) ;
911- this . _rushUserFolder = path . join ( Utilities . getHomeDirectory ( ) , '.rush' , `node-${ process . version } ` ) ;
920+ this . _versionIndependentRushUserFolder = path . join ( Utilities . getHomeDirectory ( ) , '.rush' ) ;
921+ this . _rushUserFolder = path . join ( this . _versionIndependentRushUserFolder , `node-${ process . version } ` ) ;
912922
913923 this . _rushLinkJsonFilename = path . join ( this . _commonTempFolder , 'rush-link.json' ) ;
914924 this . _currentVariantJsonFilename = path . join ( this . _commonTempFolder , 'current-variant.json' ) ;
0 commit comments