Skip to content

Commit

Permalink
Add ignore files only if there's a scm_context
Browse files Browse the repository at this point in the history
  • Loading branch information
rgoya authored Nov 4, 2024
1 parent 3895cc0 commit a682ab2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dvc/repo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,9 @@ def _ignore(self):
if cache_dir := self.cache.default_local_cache_dir:
flist.append(cache_dir)

for file in flist:
self.scm_context.ignore(file)
if self.scm_context:
for file in flist:
self.scm_context.ignore(file)

def brancher(self, *args, **kwargs):
from dvc.repo.brancher import brancher
Expand Down

0 comments on commit a682ab2

Please sign in to comment.