Skip to content

Commit

Permalink
improve message
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Nov 2, 2023
1 parent 15e86f2 commit 866c70a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/upgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 866c70a

Please sign in to comment.