Skip to content

Commit

Permalink
fix: cover case where git rev-parse returns null (typicode#1001)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcarini authored and nikoladavitkovski committed Sep 5, 2022
1 parent 80450dc commit e1efdf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const git = (args: string[]): cp.SpawnSyncReturns<Buffer> =>

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

Expand Down

0 comments on commit e1efdf6

Please sign in to comment.