Skip to content

Commit

Permalink
fix: cover case where git rev-parse returns null (#1001)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcarini authored Jul 6, 2021
1 parent 50ea409 commit 56b9306
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 56b9306

Please sign in to comment.