-
-
Notifications
You must be signed in to change notification settings - Fork 898
Closed
Description
I was trying to use the init-templatedir functionality of pre-commit and ran into a weird problem:
Using Windows 10, pre-commit 2.9.2, git version 2.29.2.windows.1
I followed the example on the pre-commit.com website and used:
git config --global init.templateDir ~/.git-template
pre-commit init-templatedir ~/.git-template
It wants me to be in a git repository (I thought you prevented this with da80cc6).
So i switched to a git repository and rerun
pre-commit init-templatedir ~/.git-template
the hooks aren't installed in the stated directory.
Based on the warnings it looks like pre-commit isn't resolving the ~ correctly, or did I miss sth.?
git config --get init.templateDir
returns ~/.git-template