diff --git a/pre_commit/clientlib.py b/pre_commit/clientlib.py index 9af2fcc7..2cf219e8 100644 --- a/pre_commit/clientlib.py +++ b/pre_commit/clientlib.py @@ -4,6 +4,7 @@ from __future__ import unicode_literals import argparse import collections import functools +import os from aspy.yaml import ordered_load from identify.identify import ALL_TAGS @@ -155,6 +156,9 @@ def ordered_load_normalize_legacy_config(contents): # TODO: Once happy, issue a deprecation warning and instructions data = collections.OrderedDict([('repos', data)]) + for repo_config in data['repos']: + repo_config['repo'] = os.path.expanduser(repo_config['repo']) + return data