Skip .cache directory for cached builds if it does not exist
@@ -157,6 +157,7 @@ class CachedEnvironmentMixin:
# Special handling for .cache directory because it's per-project
path = os.path.join(project_path, '.cache')
+ if os.path.exists(path):
tar.add(path, arcname='.cache')
storage = get_storage_class(settings.RTD_BUILD_ENVIRONMENT_STORAGE)()
