Merging upstream version 2.5.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
344ec6ad68
commit
46a56c0856
37 changed files with 457 additions and 213 deletions
|
@ -30,10 +30,11 @@ def _get_default_directory() -> str:
|
|||
`Store.get_default_directory` can be mocked in tests and
|
||||
`_get_default_directory` can be tested.
|
||||
"""
|
||||
return os.environ.get('PRE_COMMIT_HOME') or os.path.join(
|
||||
ret = os.environ.get('PRE_COMMIT_HOME') or os.path.join(
|
||||
os.environ.get('XDG_CACHE_HOME') or os.path.expanduser('~/.cache'),
|
||||
'pre-commit',
|
||||
)
|
||||
return os.path.realpath(ret)
|
||||
|
||||
|
||||
class Store:
|
||||
|
@ -182,9 +183,9 @@ class Store:
|
|||
return self._new_repo(repo, ref, deps, clone_strategy)
|
||||
|
||||
LOCAL_RESOURCES = (
|
||||
'Cargo.toml', 'main.go', 'main.rs', '.npmignore', 'package.json',
|
||||
'pre_commit_dummy_package.gemspec', 'setup.py', 'environment.yml',
|
||||
'Makefile.PL',
|
||||
'Cargo.toml', 'main.go', 'go.mod', 'main.rs', '.npmignore',
|
||||
'package.json', 'pre_commit_dummy_package.gemspec', 'setup.py',
|
||||
'environment.yml', 'Makefile.PL',
|
||||
)
|
||||
|
||||
def make_local(self, deps: Sequence[str]) -> str:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue