Skip to content

Commit 4187b4c

Browse files
committed
set explicit store path on following conditions:
* pnpmStore = 'local' * RUSH_PNPM_STORE_PATH is defined
1 parent 31e7578 commit 4187b4c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

apps/rush-lib/src/logic/InstallManager.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ import { RushGlobalFolder } from '../api/RushGlobalFolder';
6161
import { PackageManagerName } from '../api/packageManager/PackageManager';
6262
import { PnpmPackageManager } from '../api/packageManager/PnpmPackageManager';
6363
import { DependencySpecifier } from './DependencySpecifier';
64+
import { EnvironmentConfiguration } from '../api/EnvironmentConfiguration';
6465

6566
// eslint-disable-next-line @typescript-eslint/interface-name-prefix
6667
export interface CreateOptions {
@@ -1177,11 +1178,11 @@ export class InstallManager {
11771178
// Only explicitly define the store path if `pnpmStore` is using the default, or has been set to
11781179
// 'local'. If `pnpmStore` = 'global', then allow PNPM to use the system's default
11791180
// path. In all cases, this will be overridden by RUSH_PNPM_STORE_PATH
1180-
switch (this._rushConfiguration.pnpmOptions.pnpmStore) {
1181-
case 'local': {
1181+
if (
1182+
this._rushConfiguration.pnpmOptions.pnpmStore === 'local' ||
1183+
EnvironmentConfiguration.pnpmStorePathOverride
1184+
)
11821185
args.push('--store', this._rushConfiguration.pnpmOptions.pnpmStorePath);
1183-
break;
1184-
}
11851186
}
11861187

11871188
// we are using the --no-lock flag for now, which unfortunately prints a warning, but should be OK

0 commit comments

Comments
 (0)