mirror of
https://github.com/home-assistant/core.git
synced 2026-12-02 11:33:11 -04:00
Remove leftover pre-commit Git hooks in script/setup (#195844)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
co-authored by
Martin Hjelmare
parent
911126026f
commit
8c163ad0e1
@@ -31,6 +31,16 @@ fi
|
||||
|
||||
script/bootstrap
|
||||
|
||||
# Remove hooks installed by pre-commit before it was replaced by prek, so prek
|
||||
# doesn't keep them as legacy hooks and run in migration mode
|
||||
hooks_dir="$(git rev-parse --git-path hooks)"
|
||||
for hook in "$hooks_dir/pre-commit" "$hooks_dir/pre-commit.legacy"; do
|
||||
if grep -qs "File generated by pre-commit" "$hook"; then
|
||||
echo "Removing $hook installed by pre-commit."
|
||||
rm "$hook"
|
||||
fi
|
||||
done
|
||||
|
||||
prek install
|
||||
|
||||
hass --script ensure_config -c config
|
||||
|
||||
Reference in New Issue
Block a user