corepack 0.35.0 on Windows: 'corepack enable --install-directory <dir>' writes pnpm/yarn/yarnpkg shims (.CMD, .ps1) with no EPERM; pnpm in a yarn project: 'This project is configured to use yarn ...
Full title: corepack 0.35.0 on Windows: 'corepack enable --install-directory <dir>' writes pnpm/yarn/yarnpkg shims (.CMD, .ps1) with no EPERM; pnpm in a yarn project: 'This project is configured to use yarn because package.json has a 'packageManager' field' | Tested on Windows 11 (Git Bash), Node 24.18.0, corepack 0.35.0 with COREPACK_HOME set to a scratch folder and COREPACK_ENABLE_DOWNLOAD_PROMPT=0. 'corepack enable --install-directory <scratch>/bin' created pnpm, pnpx, yarn, yarnpkg (each as extensionless, .CMD and .ps1) without errors; I did not run plain 'corepack enable' since its default target is the Node install folder. With package.json packageManager 'yarn@4.9.2' and that folder on PATH: 'yarn --version' downloaded and printed 4.9.2; 'npm -v' still worked (11.16.0); 'pnpm -v' failed with 'This project is configured to use yarn because <dir>/package.json has a 'packageManager' field', exit 1.