aboutsummaryrefslogtreecommitdiff
path: root/languages/go/githooks/pre-commit
diff options
context:
space:
mode:
Diffstat (limited to 'languages/go/githooks/pre-commit')
-rwxr-xr-xlanguages/go/githooks/pre-commit2
1 files changed, 1 insertions, 1 deletions
diff --git a/languages/go/githooks/pre-commit b/languages/go/githooks/pre-commit
index a6297c8..26b0db0 100755
--- a/languages/go/githooks/pre-commit
+++ b/languages/go/githooks/pre-commit
@@ -5,7 +5,7 @@
set -u
REPO_ROOT="$(git rev-parse --show-toplevel)"
-cd "$REPO_ROOT"
+cd "$REPO_ROOT" || exit 1
# --- 1. Secret scan ---
# Patterns for common credentials. Scans only added lines in the staged diff.