Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rush-lib] Add override support for the PNPM virtual store directory #4987

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

D4N14L
Copy link
Member

@D4N14L D4N14L commented Nov 1, 2024

Summary

Adds the RUSH_PNPM_VIRTUAL_STORE_PATH environment variable override to allow moving the PNPM virtual store directory. Fixes #4974.

Details

After speaking with the creator of the bug, #4974 really was about removing the large number of dependency-related files from the RUSH_TEMP_FOLDER directory. Since we currently don't allow moving the RUSH_TEMP_FOLDER directory when using workspaces, this change continues with that approach and allows for moving the PNPM virtual store directory instead.

While it may be hypothetically possible to move the RUSH_TEMP_FOLDER directory, this is a more targeted change that accomplishes what the developer in the original issue was looking for.

How it was tested

[x] Added unit tests
[ ] Tested locally

Impacted documentation

Adds a new environment variable that likely will need to be documented on the Rushstack website.

@@ -854,6 +854,11 @@ ${gitLfsHookHandling}
}
}

// This will be overridden by RUSH_PNPM_VIRTUAL_STORE_PATH
if (EnvironmentConfiguration.pnpmVirtualStorePathOverride) {
args.push('--virtual-store-dir', this.rushConfiguration.pnpmOptions.pnpmVirtualStorePath);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a different approach than in RushPnpmCommandLineParser?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

[rush] Feature request for RUSH_TEMP_FOLDER support when pnpm useWorkspaces is true
2 participants