From: Haoqun Jiang Date: Fri, 22 Jul 2022 17:06:06 +0000 (+0800) Subject: chore: `pnpm create` already comes with `npm_config_user_agent` X-Git-Tag: v3.3.1~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78760ea2181529c12434b3171b4dd791c9aa5fa2;p=thirdparty%2Fvuejs%2Fcreate-vue.git chore: `pnpm create` already comes with `npm_config_user_agent` --- diff --git a/index.ts b/index.ts index a843b143..c0a18c56 100755 --- a/index.ts +++ b/index.ts @@ -396,8 +396,6 @@ async function init() { // Instructions: // Supported package managers: pnpm > yarn > npm - // Note: until is resolved, - // it is not possible to tell if the command is called by `pnpm init`. const userAgent = process.env.npm_config_user_agent ?? '' const packageManager = /pnpm/.test(userAgent) ? 'pnpm' : /yarn/.test(userAgent) ? 'yarn' : 'npm'