Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
typicode committed Oct 12, 2019
1 parent 89b0ffc commit c6e8787
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- If you like husky 🐶, please consider supporting this project by clicking the Sponsor button -->

You can check the [troubleshoot](https://github.com/typicode/husky#troubleshoot) section in the README and run commands with `HUSKY_DEBUG=1` to get additional information.
Before creating an issue, please check the [troubleshoot](https://github.com/typicode/husky#troubleshoot) section in the README and run commands with `HUSKY_DEBUG=1` to get additional information.

```sh
$ HUSKY_DEBUG=1 npm install husky --save-dev
$ HUSKY_DEBUG=1 git commit #...
$ HUSKY_DEBUG=1 git commit # ...
```
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ npm install husky --save-dev
git commit -m 'Keep calm and commit'
```

_Existing hooks are kept. Requires Node `>= 8.6.0` and Git `>= 2.13.2`._
_Existing hooks are kept. Requires Node `>= 8.6.0` and Git `>= 2.13.0`._

__Note__: if you're trying Yarn v2, please install `husky@next`. See [next](https://github.com/typicode/husky/tree/next) branch.

Expand Down Expand Up @@ -124,6 +124,7 @@ Support this project with your organization. Your logo will show up here with a
+ [Commits aren't blocked](#commits-arent-blocked)
+ [Commits are slow](#commits-are-slow)
+ [Testing husky in a new repo](#testing-husky-in-a-new-repo)
+ [ENOENT error 'node_modules/husky/.git/hooks'](#enoent-error-node_moduleshuskygithooks)

<!-- tocstop -->

Expand Down Expand Up @@ -324,6 +325,10 @@ npm install husky --save-dev
# Make a commit
```

#### ENOENT error 'node_modules/husky/.git/hooks'

Verify that your version of Git is `>=2.13.0`.

## See also

* [pkg-ok](https://github.com/typicode/pkg-ok) - Prevents publishing a module with bad paths or incorrect line endings
Expand Down
3 changes: 2 additions & 1 deletion src/installer/gitRevParse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default function(): {
gitCommonDir: string
} {
// https://github.com/typicode/husky/issues/580
// https://github.com/typicode/husky/issues/587
const result = execa.sync('git', [
'rev-parse',
'--show-toplevel',
Expand All @@ -22,7 +23,7 @@ export default function(): {
// If we get --absolute-git-dir in the output,
// it probably means that an older version of Git has been used.
if (gitCommonDir === '--git-common-dir') {
throw new Error('Husky requires Git >= 2.5.1, please update Git')
throw new Error('Husky requires Git >= 2.13.0, please upgrade Git')
}

return { topLevel, gitCommonDir }
Expand Down

0 comments on commit c6e8787

Please sign in to comment.