Index: gclient.py |
diff --git a/gclient.py b/gclient.py |
index b60884a0c2742bd55b43f01ddc5e5380af216bff..8a24a9f0f7a75b92002e3d882e11cc44ef410007 100755 |
--- a/gclient.py |
+++ b/gclient.py |
@@ -1162,8 +1162,12 @@ want to set 'managed': False in .gclient. |
else: |
self._enforced_os = tuple(set(self._enforced_os).union(target_os)) |
- gclient_scm.GitWrapper.cache_dir = config_dict.get('cache_dir') |
- git_cache.Mirror.SetCachePath(config_dict.get('cache_dir')) |
+ cache_dir = config_dict.get('cache_dir') |
+ if cache_dir: |
+ cache_dir = os.path.join(self.root_dir, cache_dir) |
+ cache_dir = os.path.abspath(cache_dir) |
+ gclient_scm.GitWrapper.cache_dir = cache_dir |
+ git_cache.Mirror.SetCachePath(cache_dir) |
if not target_os and config_dict.get('target_os_only', False): |
raise gclient_utils.Error('Can\'t use target_os_only if target_os is ' |