Skip to content

Commit da6742d

Browse files
authored
docs: fix husky command (#3410)
use single quotes to prevent shells from expanding the variable at hook creation time. Signed-off-by: Till Adam <[email protected]> Signed-off-by: Till Adam <[email protected]>
1 parent c936401 commit da6742d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ yarn husky install
109109
### Add hook
110110

111111
```
112-
npx husky add .husky/commit-msg "npx --no -- commitlint --edit ${1}"
112+
npx husky add .husky/commit-msg 'npx --no -- commitlint --edit ${1}'
113113
```
114114

115115
Check the [husky documentation](https://typicode.github.io/husky/#/?id=manual) on how you can automatically have Git hooks enabled after install for different `yarn` versions.

docs/guides-local-setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ yarn husky install
4040
### Add hook
4141

4242
```
43-
npx husky add .husky/commit-msg "npx --no -- commitlint --edit ${1}"
43+
npx husky add .husky/commit-msg 'npx --no -- commitlint --edit ${1}'
4444
```
4545

4646
**Please note that currently @commitlint/cli doesn't support yarn v2 Plug'n'Play (using yarn v2 with `nodeLinker: node-modules` in your .yarnrc.yml file may work sometimes)**\

0 commit comments

Comments
 (0)