Skip to content
Open
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/eight-onions-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-cloudflare": patch
---

Fix git commit failures when global pre-commit hooks are configured. When initializing projects, create-cloudflare now uses git commit --no-verify to bypass any globally configured git hooks that might fail and block project initialization.
2 changes: 1 addition & 1 deletion packages/create-cloudflare/src/__tests__/git.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ describe("git helpers", () => {
expect.any(Object),
);
expect(vi.mocked(runCommand)).toHaveBeenCalledWith(
["git", "commit", "-m", expect.any(String)],
["git", "commit", "-m", expect.any(String), "--no-verify"],
expect.any(Object),
);
expect(spinner.stop).toHaveBeenCalledOnce();
Expand Down
2 changes: 1 addition & 1 deletion packages/create-cloudflare/src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const gitCommit = async (ctx: C3Context) => {
cwd: ctx.project.path,
});

await runCommand(["git", "commit", "-m", ctx.commitMessage], {
await runCommand(["git", "commit", "-m", ctx.commitMessage, "--no-verify"], {
silent: true,
cwd: ctx.project.path,
});
Expand Down
Loading