From 8ef4e48fedaef1708af08ee1b32aef9565003435 Mon Sep 17 00:00:00 2001 From: Ccjr Yueys Date: Mon, 18 Mar 2024 19:07:09 +0800 Subject: [PATCH] fix: Command description for Bun --- index.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index 19bd910b..611fec77 100755 --- a/index.ts +++ b/index.ts @@ -563,9 +563,15 @@ async function init() { } // Instructions: - // Supported package managers: pnpm > yarn > npm + // Supported package managers: pnpm > yarn > bun > npm const userAgent = process.env.npm_config_user_agent ?? '' - const packageManager = /pnpm/.test(userAgent) ? 'pnpm' : /yarn/.test(userAgent) ? 'yarn' : 'npm' + const packageManager = /pnpm/.test(userAgent) + ? 'pnpm' + : /yarn/.test(userAgent) + ? 'yarn' + : /bun/.test(userAgent) + ? 'bun' + : 'npm' // README generation fs.writeFileSync( -- 2.39.5