We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1992b15 commit 16bba79Copy full SHA for 16bba79
index.js
@@ -337,9 +337,10 @@ async function init() {
337
// Supported package managers: pnpm > yarn > npm
338
// Note: until <https://github.com/pnpm/pnpm/issues/3505> is resolved,
339
// it is not possible to tell if the command is called by `pnpm init`.
340
- const packageManager = /pnpm/.test(process.env.npm_execpath)
+ const packageManagerBinary = path.basename(process.env.npm_execpath)
341
+ const packageManager = /pnpm/.test(packageManagerBinary)
342
? 'pnpm'
- : /yarn/.test(process.env.npm_execpath)
343
+ : /yarn/.test(packageManagerBinary)
344
? 'yarn'
345
: 'npm'
346
0 commit comments