mounting the superproject directory

This commit is contained in:
Ilya Epifanov 2019-05-08 14:32:04 +02:00
parent 69709798c6
commit b30df02920
2 changed files with 8 additions and 5 deletions

View file

@ -40,10 +40,12 @@ def get_root():
def get_superproject_root():
stdout = cmd_output('git',
stdout = cmd_output(
'git',
'rev-parse',
'--show-superproject-working-tree',
'--show-toplevel')
'--show-toplevel',
)
return stdout[1].splitlines()[0].strip()

View file

@ -5,7 +5,8 @@ import hashlib
import os
import pre_commit.constants as C
from pre_commit import five, git
from pre_commit import five
from pre_commit import git
from pre_commit.languages import helpers
from pre_commit.util import CalledProcessError
from pre_commit.util import clean_path_on_failure