You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The detection of the package manager is wrong when doing pnpm dlx @ignored/hardhat-vnext@next --init. It installs things with npm. My guess is that the logic is "use pnpm if a pnpm-lock.yaml file exists", but this doesn't work when using pnpm dlx.
I think we should first try using process.env.npm_config_user_agent. It seems to be supported by npm, pnpm and yarn. If that's undefined or we can't use it for any reason, then we can fallback to the current logic. These are the values returned in my machine for each package manager:
npm/10.9.0 node/v22.12.0 linux x64 workspaces/false
pnpm/9.15.0 npm/? node/v22.12.0 linux x64
yarn/4.5.3 npm/? node/v22.12.0 linux x64
The text was updated successfully, but these errors were encountered:
This one was raised by Franco:
The text was updated successfully, but these errors were encountered: