We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f22a6b commit c595b77Copy full SHA for c595b77
.husky/pre-commit
@@ -1 +1,20 @@
1
+#!/bin/bash
2
+
3
+# Load .env file if it exists
4
+if [ -f .env ]; then
5
+ export $(grep -v '^#' .env | grep -v '^[[:space:]]*$' | xargs 2>/dev/null)
6
+fi
7
8
+# Check if AGENT_PACKAGE_LOCATION is set and lockfile is being committed
9
+if [ -n "$AGENT_PACKAGE_LOCATION" ]; then
10
+ if git diff --cached --name-only | grep -q "pnpm-lock.yaml"; then
11
+ echo "❌ Error: Cannot commit pnpm-lock.yaml when AGENT_PACKAGE_LOCATION is set"
12
+ echo " You have a local agent override active in .env"
13
+ echo " Either:"
14
+ echo " - Comment out AGENT_PACKAGE_LOCATION in .env and run bin/setup"
15
+ echo " - Unstage pnpm-lock.yaml: git reset pnpm-lock.yaml"
16
+ exit 1
17
+ fi
18
19
20
pnpm lint-staged
0 commit comments