From ca9e07c3f36021b204f3ce6802f4b3719975eba2 Mon Sep 17 00:00:00 2001 From: D-Sketon <2055272094@qq.com> Date: Sat, 6 Jul 2024 16:44:12 +0800 Subject: [PATCH] feat: prioritize the use of pnpm (#509) --- lib/console/init.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/console/init.ts b/lib/console/init.ts index cee916ea..4e15a4ae 100644 --- a/lib/console/init.ts +++ b/lib/console/init.ts @@ -52,10 +52,10 @@ async function initConsole(this: Context, args: InitArgs) { log.info('Install dependencies'); let npmCommand = 'npm'; - if (commandExistsSync('yarn')) { - npmCommand = 'yarn'; - } else if (commandExistsSync('pnpm')) { + if (commandExistsSync('pnpm')) { npmCommand = 'pnpm'; + } else if (commandExistsSync('yarn')) { + npmCommand = 'yarn'; } try {