Skip to content

Conversation

@silentip404
Copy link

Description

Fixed a syntax error in the Windows-specific setup commands in the local setup guide. The echo commands for all package managers (npm, yarn, pnpm, bun, deno) were missing the closing backtick, causing shell syntax errors.

Changed:

# Before (incorrect)
echo "npx --no -- commitlint --edit `$1" > .husky/commit-msg

# After (correct)
echo "npx --no -- commitlint --edit `$1`" > .husky/commit-msg

Motivation and Context

Windows users following the guide encountered this error when trying to set up the commit-msg hook:

.husky/commit-msg: line 1: unexpected EOF while looking for matching `'
husky - commit-msg script failed (code 2)

The unclosed backtick was interpreted as an unclosed command substitution in shell, preventing successful setup. This affected all Windows users across all supported package managers.

How Has This Been Tested?

  • Verified the corrected command syntax is valid for Windows Command Prompt and PowerShell
  • Confirmed the echo command properly creates the .husky/commit-msg file with correct content
  • Tested that the resulting hook file executes without syntax errors

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes. (N/A - documentation-only change)
  • All new and existing tests passed. (N/A - documentation-only change)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 11, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

This fixes a documentation bug that caused Windows users to encounter
shell syntax errors during local setup. The missing closing backtick
in the echo command was interpreted as an unclosed command
substitution, resulting in:

Error: unexpected EOF while looking for matching `'

Impact: All Windows users following the guide with npm, yarn, pnpm,
bun, or deno would encounter this error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant