Files
piratepoet/mailpoet/tasks/lint-staged-css.sh
John Oleksowicz fcc4be330c Add set -e to hook scripts to exit on fail
MAILPOET-4237
2024-02-08 11:13:35 -06:00

17 lines
331 B
Bash
Executable File

#!/bin/sh
set -e
source $PWD/.env
if [ "$MP_GIT_HOOKS_ENABLE" != "true" ]; then
echo "MP_GIT_HOOKS_ENABLE is not set to 'true', skipping lint-staged-css."
exit 0
fi
if [ "$MP_GIT_HOOKS_STYLELINT" = "true" ]; then
pnpm run stylelint $@
else
echo "MP_GIT_HOOKS_STYLELINT is not set to 'true', skipping stylelint."
fi