Files
dvc/dvc/command/add.py
T
2018-02-06 18:38:29 +02:00

14 lines
374 B
Python

from dvc.exceptions import DvcException
from dvc.command.common.base import CmdBase
class CmdAdd(CmdBase):
def run(self):
for target in self.args.targets:
try:
self.project.add(target)
except DvcException as ex:
self.project.logger.error('Failed to add {}', ex)
return 1
return 0