Skip to content

Commit

Permalink
fix: shadcn init with correct packageManager (#5299)
Browse files Browse the repository at this point in the history
* fix: shadcn init with correct  packageManager

* chore: changeset

---------

Co-authored-by: shadcn <m@shadcn.com>
  • Loading branch information
fourcels and shadcn authored Oct 25, 2024
1 parent d0eece0 commit 986c00e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/modern-pens-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"shadcn": patch
---

fix package manager fallback
4 changes: 3 additions & 1 deletion packages/shadcn/src/utils/create-project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ export async function createProject(
}
}

const packageManager = await getPackageManager(options.cwd)
const packageManager = await getPackageManager(options.cwd, {
withFallback: true,
})

const { name } = await prompts({
type: "text",
Expand Down

0 comments on commit 986c00e

Please sign in to comment.