From 10f5344bf29a66aa69b2fdc0cac54f88cccfc5ca Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Wed, 24 Apr 2024 05:29:43 +0530 Subject: [PATCH] fix(hooks): patch shebang --- .githooks/pre-commit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.githooks/pre-commit b/.githooks/pre-commit index d401024..d400b4e 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This commit hook checks whether we ran `yarn build` when committed TypeScript files. # For GitHub actions to work, we need to check the compiled JavaScript into VCS. @@ -9,7 +9,7 @@ TS_FILES=$(git diff --staged --name-only | grep '\.ts' | grep -cv '__tests__') DIST_MODIFIED=$(git diff --staged --name-only | grep -c dist/index.js) -if [ $TS_FILES -gt 0 ] && [ $DIST_MODIFIED -eq 0 ] ; then +if [ "$TS_FILES" -gt 0 ] && [ "$DIST_MODIFIED" -eq 0 ] ; then echo "You modified TypeScript files but apparently did not run 'yarn build'". exit 1; fi