mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
pnpmConfigHook: disable version management before any execution of pnpm commands
This would prevent hanging when pnpm tries to download the version set in package.json.
This commit is contained in:
parent
ce031847d1
commit
4f0a7d184a
1 changed files with 6 additions and 7 deletions
|
|
@ -17,6 +17,12 @@ pnpmConfigHook() {
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# If the packageManager field in package.json is set to a different pnpm version than what is in nixpkgs,
|
||||
# any pnpm command would fail in that directory, the following disables this
|
||||
pushd $HOME
|
||||
pnpm config set manage-package-manager-versions false
|
||||
popd
|
||||
|
||||
echo "Found 'pnpm' with version '$(pnpm --version)'"
|
||||
|
||||
fetcherVersion=$(cat "${pnpmDeps}/.fetcher-version" || echo 1)
|
||||
|
|
@ -37,13 +43,6 @@ pnpmConfigHook() {
|
|||
|
||||
chmod -R +w "$STORE_PATH"
|
||||
|
||||
|
||||
# If the packageManager field in package.json is set to a different pnpm version than what is in nixpkgs,
|
||||
# any pnpm command would fail in that directory, the following disables this
|
||||
pushd $HOME
|
||||
pnpm config set manage-package-manager-versions false
|
||||
popd
|
||||
|
||||
pnpm config set store-dir "$STORE_PATH"
|
||||
|
||||
# Prevent hard linking on file systems without clone support.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue