We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56b9306 commit cf2e50cCopy full SHA for cf2e50c
src/index.ts
@@ -11,6 +11,8 @@ const git = (args: string[]): cp.SpawnSyncReturns<Buffer> =>
11
12
export function install(dir = '.husky'): void {
13
// Ensure that we're inside a git repository
14
+ // If git command is not found, status is null and we should return.
15
+ // That's why status value needs to be checked explicitly.
16
if (git(['rev-parse']).status !== 0) {
17
return
18
}
0 commit comments