mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-09 23:10:24 +01:00
15 lines
403 B
Python
15 lines
403 B
Python
from dvc.exceptions import DvcException
|
|
from dvc.command.base import CmdBase
|
|
from dvc.logger import Logger
|
|
|
|
|
|
class CmdAdd(CmdBase):
|
|
def run(self):
|
|
for target in self.args.targets:
|
|
try:
|
|
self.project.add(target)
|
|
except DvcException as ex:
|
|
Logger.error('Failed to add \'{}\''.format(target), ex)
|
|
return 1
|
|
return 0
|