mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Use the real path of the cache root
This commit is contained in:
parent
450d617dec
commit
4c154c3019
2 changed files with 8 additions and 4 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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue