Skip to content

Commit c1f7838

Browse files
fourcelsshadcn
andauthored
fix: shadcn init with correct packageManager (shadcn-ui#5299)
* fix: shadcn init with correct packageManager * chore: changeset --------- Co-authored-by: shadcn <[email protected]>
1 parent f99fbbd commit c1f7838

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/modern-pens-sell.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"shadcn": patch
3+
---
4+
5+
fix package manager fallback

packages/shadcn/src/utils/create-project.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ export async function createProject(
3737
}
3838
}
3939

40-
const packageManager = await getPackageManager(options.cwd)
40+
const packageManager = await getPackageManager(options.cwd, {
41+
withFallback: true,
42+
})
4143

4244
const { name } = await prompts({
4345
type: "text",

0 commit comments

Comments
 (0)