Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

chore: check for CLI installation before pre-commit

Daniel Hougaardd4d468660dee
diff --git a/.husky/pre-commit b/.husky/pre-commit
index 4f18d25215..9a9f7b9e4c 100755
--- a/.husky/pre-commit
+++ b/.husky/pre-commit
@@ -1,6 +1,12 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
+# Check if infisical is installed
+if ! command -v infisical >/dev/null 2>&1; then
+ echo "\nError: Infisical CLI is not installed. Please install the Infisical CLI before comitting.\n You can refer to the documentation at https://infisical.com/docs/cli/overview\n\n"
+ exit 1
+fi
+
npx lint-staged
infisical scan git-changes --staged -v