From 9b30d74d01bd879f90669b1d41b72bd5ba0922fb Mon Sep 17 00:00:00 2001 From: ytalashko Date: Wed, 1 Jul 2015 19:33:39 +0300 Subject: [PATCH] [FIX] DCOS-754 package update creates dcos cache in ~/ directory --- dcos/package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dcos/package.py b/dcos/package.py index c8e3227..b3d1634 100644 --- a/dcos/package.py +++ b/dcos/package.py @@ -657,7 +657,8 @@ def update_sources(config, validate=False): errors = [] # ensure the cache directory is properly configured - cache_dir = util.get_config_vals(config, ['package.cache'])[0] + cache_dir = os.path.expanduser( + util.get_config_vals(config, ['package.cache'])[0]) # ensure the cache directory exists if not os.path.exists(cache_dir): @@ -755,7 +756,8 @@ class Source: :rtype: str or None """ - cache_dir = util.get_config_vals(config, ['package.cache'])[0] + cache_dir = os.path.expanduser( + util.get_config_vals(config, ['package.cache'])[0]) return os.path.join(cache_dir, self.hash()) def copy_to_cache(self, target_dir):