From 3427c6a68870738fc6d0f0c9da7a69c4e79e0e1f Mon Sep 17 00:00:00 2001 From: Terje Larsen Date: Wed, 30 Jul 2025 10:31:50 +0200 Subject: [PATCH] pnpm.configHook: prevent hard linking on file systems without clone support Fix #426636 --- pkgs/development/tools/pnpm/fetch-deps/pnpm-config-hook.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/tools/pnpm/fetch-deps/pnpm-config-hook.sh b/pkgs/development/tools/pnpm/fetch-deps/pnpm-config-hook.sh index a9fc3050435b..fc0103bbe8f1 100644 --- a/pkgs/development/tools/pnpm/fetch-deps/pnpm-config-hook.sh +++ b/pkgs/development/tools/pnpm/fetch-deps/pnpm-config-hook.sh @@ -36,6 +36,10 @@ pnpmConfigHook() { pnpm config set store-dir "$STORE_PATH" + # Prevent hard linking on file systems without clone support. + # See: https://pnpm.io/settings#packageimportmethod + pnpm config set package-import-method clone-or-copy + if [[ -n "$pnpmWorkspace" ]]; then echo "'pnpmWorkspace' is deprecated, please migrate to 'pnpmWorkspaces'." exit 2