From e1efdf6324670b9875362903ec1aa0a6fdf73f9b Mon Sep 17 00:00:00 2001 From: Marco Carini Date: Tue, 6 Jul 2021 05:17:32 -0500 Subject: [PATCH] fix: cover case where git rev-parse returns null (#1001) --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 7228f3c88..9c4db4e7f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,7 +11,7 @@ const git = (args: string[]): cp.SpawnSyncReturns => 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 }