Skip to content

Commit 56b9306

Browse files
authored
fix: cover case where git rev-parse returns null (#1001)
1 parent 50ea409 commit 56b9306

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const git = (args: string[]): cp.SpawnSyncReturns<Buffer> =>
1111

1212
export function install(dir = '.husky'): void {
1313
// Ensure that we're inside a git repository
14-
if (git(['rev-parse']).status) {
14+
if (git(['rev-parse']).status !== 0) {
1515
return
1616
}
1717

0 commit comments

Comments
 (0)