Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): Suggest pnpm dlx instead of pnpx #11183

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/purple-pears-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Suggest `pnpm dlx` instead of `pnpx` in update check.
4 changes: 2 additions & 2 deletions packages/astro/src/cli/install-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function getInstallCommand(packages: string[], packageManager: string) {
}

/**
* Get the command to execute and download a package (e.g. `npx`, `yarn dlx`, `pnpx`, etc.)
* Get the command to execute and download a package (e.g. `npx`, `yarn dlx`, `pnpm dlx`, etc.)
* @param packageManager - Optional package manager to use. If not provided, Astro will attempt to detect the preferred package manager.
* @returns The command to execute and download a package
*/
Expand All @@ -114,7 +114,7 @@ export async function getExecCommand(packageManager?: string): Promise<string> {
case 'yarn':
return 'yarn dlx';
case 'pnpm':
return 'pnpx';
return 'pnpm dlx';
case 'bun':
return 'bunx';
default:
Expand Down
Loading