Skip to content

Commit 09a3ff8

Browse files
committed
fix: fallback to npm when pnpm is not detected
1 parent 374bbd1 commit 09a3ff8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/utils/installDependencies.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ const userAgent = process.env.npm_config_user_agent ?? ''
66

77
export const packageManager = /bun/.test(userAgent)
88
? 'bun'
9-
: 'pnpm'
9+
: (/pnpm/.test(userAgent)
10+
? 'pnpm'
11+
: 'npm')
1012

1113
export async function installDependencies (root: string = process.cwd(), manager: 'npm' | 'pnpm' | 'yarn' | 'bun' = packageManager) {
1214
if (manager === 'yarn') {

0 commit comments

Comments
 (0)