Skip to content

Commit 4155a37

Browse files
committed
fix(init): use yarn as package manager when calling init with npx
1 parent 3945227 commit 4155a37

File tree

1 file changed

+1
-7
lines changed
  • packages/cli/src/commands/init

1 file changed

+1
-7
lines changed

packages/cli/src/commands/init/init.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -331,13 +331,7 @@ async function createProject(
331331
function userAgentPackageManager() {
332332
const userAgent = process.env.npm_config_user_agent;
333333

334-
if (userAgent) {
335-
if (userAgent.startsWith('yarn')) {
336-
return 'yarn';
337-
}
338-
if (userAgent.startsWith('npm')) {
339-
return 'npm';
340-
}
334+
if (userAgent && userAgent.startsWith('bun')) {
341335
if (userAgent.startsWith('bun')) {
342336
return 'bun';
343337
}

0 commit comments

Comments
 (0)