mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-14 13:00:10 -06:00
Use expanduser in init-templatedir like git does
This commit is contained in:
@@ -18,7 +18,7 @@ def init_templatedir(config_file, store, directory, hook_type):
|
||||
except CalledProcessError:
|
||||
configured_path = None
|
||||
else:
|
||||
configured_path = os.path.realpath(out.strip())
|
||||
configured_path = os.path.realpath(os.path.expanduser(out.strip()))
|
||||
dest = os.path.realpath(directory)
|
||||
if configured_path != dest:
|
||||
logger.warning('`init.templateDir` not set to the target directory')
|
||||
|
||||
Reference in New Issue
Block a user