fix(create-cloudflare): bypass git hooks during initial commit #10914
+7
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #8914.
This PR fixes an issue where
create-cloudflare
(used bywrangler init
) fails when users have global git pre-commit hooks configured. The failure occurs during the initial git commit step of project initialization.Changes
--no-verify
flag to thegit commit
command inpackages/create-cloudflare/src/git.ts
Why
--no-verify
?Using
--no-verify
is appropriate here because:Testing
--no-verify
flag is usedgitCommit
function which is only called during project initializationLink to Devin run: https://app.devin.ai/sessions/93d529e93be849a1856e6faab17a6673
Requested by: @smacleod