From 3a32d90f50be8aec51808de498272c4fd97550bb Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Thu, 1 Feb 2024 15:00:31 +0200 Subject: [PATCH] repo: index: don't set cache storage if there is no out.cache --- dvc/repo/index.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dvc/repo/index.py b/dvc/repo/index.py index f2d10f127a..32ce5b5786 100644 --- a/dvc/repo/index.py +++ b/dvc/repo/index.py @@ -215,7 +215,9 @@ def _load_storage_from_out(storage_map, key, out): from dvc.config import NoRemoteError from dvc_data.index import FileStorage, ObjectStorage - storage_map.add_cache(ObjectStorage(key, out.cache)) + if out.cache: + storage_map.add_cache(ObjectStorage(key, out.cache)) + try: remote = out.repo.cloud.get_remote(out.remote) if remote.fs.version_aware: