mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-16 02:21:46 +04:00
Add path expand for repo URL
This commit is contained in:
parent
c7ba14e8ef
commit
20addf4d87
1 changed files with 4 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ from __future__ import unicode_literals
|
||||||
import argparse
|
import argparse
|
||||||
import collections
|
import collections
|
||||||
import functools
|
import functools
|
||||||
|
import os
|
||||||
|
|
||||||
from aspy.yaml import ordered_load
|
from aspy.yaml import ordered_load
|
||||||
from identify.identify import ALL_TAGS
|
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
|
# TODO: Once happy, issue a deprecation warning and instructions
|
||||||
data = collections.OrderedDict([('repos', data)])
|
data = collections.OrderedDict([('repos', data)])
|
||||||
|
|
||||||
|
for repo_config in data['repos']:
|
||||||
|
repo_config['repo'] = os.path.expanduser(repo_config['repo'])
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue