@@ -49,6 +49,7 @@ const MAX_INSTALL_ATTEMPTS: number = 2;
4949 * As a temporary workaround, augment the type.
5050 */
5151import { CreateOptions } from 'tar' ;
52+ import { RushGlobalFolders } from '../api/RushGlobalFolders' ;
5253
5354export interface CreateOptions { // tslint:disable-line:interface-name
5455 /**
@@ -113,6 +114,7 @@ export interface IInstallManagerOptions {
113114 */
114115export class InstallManager {
115116 private _rushConfiguration : RushConfiguration ;
117+ private _rushGlobalFolders : RushGlobalFolders ;
116118 private _commonNodeModulesMarker : LastInstallFlag ;
117119 private _commonTempFolderRecycler : AsyncRecycler ;
118120
@@ -235,8 +237,14 @@ export class InstallManager {
235237 return this . _commonNodeModulesMarker ;
236238 }
237239
238- constructor ( rushConfiguration : RushConfiguration , purgeManager : PurgeManager , options : IInstallManagerOptions ) {
240+ constructor (
241+ rushConfiguration : RushConfiguration ,
242+ rushGlobalFolders : RushGlobalFolders ,
243+ purgeManager : PurgeManager ,
244+ options : IInstallManagerOptions
245+ ) {
239246 this . _rushConfiguration = rushConfiguration ;
247+ this . _rushGlobalFolders = rushGlobalFolders ;
240248 this . _commonTempFolderRecycler = purgeManager . commonTempFolderRecycler ;
241249 this . _options = options ;
242250
@@ -341,7 +349,7 @@ export class InstallManager {
341349 */
342350 public ensureLocalPackageManager ( ) : Promise < void > {
343351 // Example: "C:\Users\YourName\.rush"
344- const rushUserFolder : string = this . _rushConfiguration . _rushNodeSpecificUserFolder ;
352+ const rushUserFolder : string = this . _rushGlobalFolders . rushNodeSpecificGlobalFolder ;
345353
346354 if ( ! FileSystem . exists ( rushUserFolder ) ) {
347355 console . log ( 'Creating ' + rushUserFolder ) ;
@@ -925,7 +933,7 @@ export class InstallManager {
925933
926934 private _checkIfReleaseIsPublished ( ) : Promise < boolean > {
927935 return Promise . resolve ( ) . then ( ( ) => {
928- const lastCheckFile : string = path . join ( this . _rushConfiguration . _rushNodeSpecificUserFolder ,
936+ const lastCheckFile : string = path . join ( this . _rushGlobalFolders . rushNodeSpecificGlobalFolder ,
929937 'rush-' + Rush . version , 'last-check.flag' ) ;
930938
931939 if ( FileSystem . exists ( lastCheckFile ) ) {
0 commit comments