From 972f130ca3917b93cbefdfc85e022f22a16fea5d Mon Sep 17 00:00:00 2001 From: Marco Carini Date: Thu, 1 Jul 2021 09:56:14 -0500 Subject: [PATCH] fix: cover case where git rev-parse returns null --- 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 }