mirror of
https://github.com/PostHog/posthog.git
synced 2024-12-01 04:12:23 +01:00
14 lines
442 B
Bash
Executable File
14 lines
442 B
Bash
Executable File
#!/bin/sh
|
|
. "$(dirname "$0")/_/husky.sh"
|
|
|
|
# Check if staged files contain any added or modified PNGs
|
|
if git diff --cached --name-status | grep '^[AM]' | grep -q '.png$'; then
|
|
# Error if OptiPNG is not installed
|
|
if ! command -v optipng >/dev/null; then
|
|
echo "PNG files must be optimized before being committed, but OptiPNG is not installed! Fix this with \`brew/apt install optipng\`."
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
pnpm lint-staged
|