diff --git a/src/index.ts b/src/index.ts index 9c4db4e7f..7902c4075 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,6 +11,8 @@ const git = (args: string[]): cp.SpawnSyncReturns => export function install(dir = '.husky'): void { // Ensure that we're inside a git repository + // If git command is not found, status is null and we should return. + // That's why status value needs to be checked explicitly. if (git(['rev-parse']).status !== 0) { return }