dev: devenv update, fix legacy pre-commit hooks
Some checks failed
CI / Test (OTP 27.2 / Elixir 1.18.2) (push) Failing after 0s
CI / Test (OTP 28.4 / Elixir 1.19.4 + E2E) (push) Failing after 0s

This commit is contained in:
2026-03-26 13:02:08 +01:00
parent 39282c8a59
commit 8a4ec953b4
2 changed files with 41 additions and 6 deletions

View File

@@ -189,6 +189,21 @@ in {
# https://devenv.sh/scripts/
enterShell = ''
cleanup_stale_git_hook_legacy() {
hooks_dir="$(git rev-parse --git-path hooks 2>/dev/null)" || return 0
for legacy_hook in "$hooks_dir"/*.legacy; do
[ -e "$legacy_hook" ] || continue
if grep -Fq "File generated by pre-commit: https://pre-commit.com" "$legacy_hook"; then
rm -f "$legacy_hook"
echo "Removed stale legacy git hook: $legacy_hook"
fi
done
}
cleanup_stale_git_hook_legacy
echo
elixir --version
echo