Skip to content

wrangler init breaks if a global git hook fails #8914

@jyn514

Description

@jyn514

Which Cloudflare product(s) does this pertain to?

Wrangler

What versions & operating system are you using?

wrangler 4.10.0

Please provide a link to a minimal reproduction

see below

Describe the Bug

steps to replicate:

  1. mkdir hooks; printf '#!/bin/sh\nfalse' > hooks/pre-commit; chmod +x hooks/pre-commit
  2. git config --global core.hooksPath $(realpath hooks)
  3. wrangler init my-worker -y

expected behavior: i see the full onboarding flow (including the last "Deploy with Cloudflare" step and the help text afterwards).

actual behavior:

╭ Configuring your application for Cloudflare Step 2 of 3
...
├ Initializing git repo
│ initialized git
│
╰  ERROR  Error

Please provide any relevant error logs

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionA question about a feature rather than a bug

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions