mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
[git_cache] Allow expansion of ~ in git cache.cachepath parameter.
All git path parameters support `~` expansion, there's no reason we shouldn't do this for cache.cachepath parameter used by gclient. Change-Id: I92485d5f17d8ab8125074253f75e0ef2e2ff41e1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5227662 Commit-Queue: Aleksey Khoroshilov <akhoroshilov@brave.com> Reviewed-by: Gavin Mak <gavinmak@google.com>
This commit is contained in:
committed by
LUCI CQ
parent
00ae0c065c
commit
097edbaba6
@@ -197,7 +197,8 @@ class Mirror(object):
|
||||
try:
|
||||
cachepath = subprocess.check_output(
|
||||
[cls.git_exe, 'config'] + cls._GIT_CONFIG_LOCATION +
|
||||
['cache.cachepath']).decode('utf-8', 'ignore').strip()
|
||||
['--type', 'path', 'cache.cachepath']).decode(
|
||||
'utf-8', 'ignore').strip()
|
||||
except subprocess.CalledProcessError:
|
||||
cachepath = os.environ.get('GIT_CACHE_PATH',
|
||||
cls.UNSET_CACHEPATH)
|
||||
|
||||
Reference in New Issue
Block a user