pnpm: persist global data and add to path#6762
pnpm: persist global data and add to path#6762jack-mil wants to merge 3 commits intoScoopInstaller:masterfrom
Conversation
|
All changes look good. Wait for review from human collaborators. pnpm
|
|
I realize that this is a pretty major breaking change to those using this manifest already. Migration or at the very least a warning on updating is probably required. I would need advice on what is the canonical way to do that; if this change is even deemed necessary in the first place. |
|
See #6462 (comment) |
|
I have finally gotten to this. I am not a |
|
For #6713, We should provide script similar
Personally, I prefer to install |
Following off of the similar python and rustup manifests, I have updated pnpm to make use of the $PNPM_HOME env variable in order to install global packages or cli utilities into a scoop-managed and persisted directory (instead of the default on windows:
~/AppData/Local/pnpm/globalAn alternative approach would be to:
a) Leave the pnpm default global directory as is, and simply add
~/AppData/Local/pnpm/globalto PATH when installing the manifest. This would also fix issues like #6713. But the application data would not be contained within the~/scoopfolder (generally prefered).b) Instruct users to run
pnpm setupafter installation, which will- create a home directory for the pnpm CLI (
~/AppData/Local/pnpm/global)- adds the pnpm home directory to the PATH environment variable
- copies the pnpm executable to the pnpm home directory
In this case however, scoop will no longer manage pnpm at all, and it will be no different than installing manually (without scoop).
Note: $PNPM_HOME cannot be set to "$persist_dir\pnpm_data" because it seems that
pnpmchecks at runtime if the exact directory $PNPM_HOME is in $PATH, and doesn't follow symlinks.Fixes: #6713
<manifest-name[@version]|chore>: <general summary of the pull request>