dev: devenv update, fix legacy pre-commit hooks
This commit is contained in:
15
devenv.nix
15
devenv.nix
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user