From c511b3415a16abc0c4f6cc95d3e792567292425a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Michaud?= Date: Wed, 2 Mar 2022 00:10:15 +0100 Subject: [PATCH] build: disable pre-commit hook by env variable (#2887) One can set the NO_HOOK env variable to avoid running the pre-commit hook. It can be useful when performing large refactorings. --- .github/pre-commit | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/pre-commit b/.github/pre-commit index 6b9be9459..d38e39af9 100755 --- a/.github/pre-commit +++ b/.github/pre-commit @@ -1,4 +1,10 @@ #!/bin/sh + +if [[ ! -z "$NO_HOOK" ]] +then + exit 0 +fi + . "$(dirname "$0")/_/husky.sh" . "$(dirname "$0")/required-apps"