Skip to content

Commit 17bcdb4

Browse files
authored
Merge pull request #6791 from readthedocs/humitos/skip-env-cache
Skip .cache directory for cached builds if it does not exist
2 parents 7b41b22 + 1351034 commit 17bcdb4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

readthedocs/projects/tasks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ def push_cached_environment(self):
157157

158158
# Special handling for .cache directory because it's per-project
159159
path = os.path.join(project_path, '.cache')
160-
tar.add(path, arcname='.cache')
160+
if os.path.exists(path):
161+
tar.add(path, arcname='.cache')
161162

162163
storage = get_storage_class(settings.RTD_BUILD_ENVIRONMENT_STORAGE)()
163164
with open(tmp_filename, 'rb') as fd:

0 commit comments

Comments
 (0)