Skip to content

Commit dfb378a

Browse files
authored
docs: fix missing backtick in Windows setup commands #4559
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.
1 parent 803c05b commit dfb378a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/guides/local-setup.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ npx husky install
3939
# Add commit message linting to commit-msg hook
4040
echo "npx --no -- commitlint --edit \$1" > .husky/commit-msg
4141
# Windows users should use ` to escape dollar signs
42-
echo "npx --no -- commitlint --edit `$1" > .husky/commit-msg
42+
echo "npx --no -- commitlint --edit `$1`" > .husky/commit-msg
4343
```
4444

4545
As an alternative you can create a script inside `package.json`
@@ -62,7 +62,7 @@ yarn husky install
6262
# Add commit message linting to commit-msg hook
6363
echo "yarn commitlint --edit \$1" > .husky/commit-msg
6464
# Windows users should use ` to escape dollar signs
65-
echo "yarn commitlint --edit `$1" > .husky/commit-msg
65+
echo "yarn commitlint --edit `$1`" > .husky/commit-msg
6666
```
6767

6868
As an alternative you can create a script inside `package.json`
@@ -88,7 +88,7 @@ pnpm husky install
8888
# Add commit message linting to commit-msg hook
8989
echo "pnpm dlx commitlint --edit \$1" > .husky/commit-msg
9090
# Windows users should use ` to escape dollar signs
91-
echo "pnpm dlx commitlint --edit `$1" > .husky/commit-msg
91+
echo "pnpm dlx commitlint --edit `$1`" > .husky/commit-msg
9292
```
9393

9494
As an alternative you can create a script inside `package.json`
@@ -111,7 +111,7 @@ bunx husky install
111111
# Add commit message linting to commit-msg hook
112112
echo "bunx commitlint --edit \$1" > .husky/commit-msg
113113
# Windows users should use ` to escape dollar signs
114-
echo "bunx commitlint --edit `$1" > .husky/commit-msg
114+
echo "bunx commitlint --edit `$1`" > .husky/commit-msg
115115
```
116116

117117
== deno
@@ -127,7 +127,7 @@ deno task --eval husky install
127127
# Add commit message linting to commit-msg hook
128128
echo "deno task --eval commitlint --edit \$1" > .husky/commit-msg
129129
# Windows users should use ` to escape dollar signs
130-
echo "deno task --eval commitlint --edit `$1" > .husky/commit-msg
130+
echo "deno task --eval commitlint --edit `$1`" > .husky/commit-msg
131131
```
132132

133133
:::

0 commit comments

Comments
 (0)