ignore: move debug statetement to the proper location

This commit is contained in:
Daniele Trifirò
2022-01-26 18:44:01 +02:00
committed by Ruslan Kuprieiev
parent d882e21b9b
commit e3b97cb3a7
+1 -1
View File
@@ -75,13 +75,13 @@ class SCMContext:
from dvc.scm import SCMError
logger.debug("Adding '%s' to gitignore file.", path)
try:
gitignore_file = self.scm.ignore(path)
except FileNotInRepoError as exc:
raise SCMError(str(exc))
if gitignore_file:
logger.debug("Added '%s' to gitignore file.", path)
self.track_file(relpath(gitignore_file))
return self.ignored_paths.append(path)