From 866c70ac00ef1b6b2871c308c01c377ae8dc6107 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Thu, 2 Nov 2023 01:25:38 +0100 Subject: [PATCH] improve message --- src/commands/upgrade.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/upgrade.ts b/src/commands/upgrade.ts index 31ca31d1..7a11c677 100644 --- a/src/commands/upgrade.ts +++ b/src/commands/upgrade.ts @@ -45,8 +45,8 @@ export default defineCommand({ // Check package manager const packageManager = getPackageManager(cwd) if (!packageManager) { - console.error( - `Unable to determine which package manager this project uses (no known lock files in \`${cwd}\` or \`packageManager\` field in \`package.json\`), please run the install command for your package manager, ex: "pnpm i" or "npm i" first, and try again.`, + consola.error( + `Unable to determine the package manager used by this project.\n\nNo lock files found in \`${cwd}\`, and no \`packageManager\` field specified in \`package.json\`.\n\nPlease either add the \`packageManager\` field to \`package.json\` or execute the installation command for your package manager. For example, you can use \`pnpm i\`, \`npm i\`, \`bun i\`, or \`yarn i\`, and then try again.`, ) process.exit(1) }