mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-11 15:28:27 +01:00
- Remove deprecation warnings - Format error output and remove duplicated info Close #1086
15 lines
405 B
Python
15 lines
405 B
Python
import dvc.logger as logger
|
|
from dvc.exceptions import DvcException
|
|
from dvc.command.base import CmdBase
|
|
|
|
|
|
class CmdAdd(CmdBase):
|
|
def run(self):
|
|
for target in self.args.targets:
|
|
try:
|
|
self.project.add(target, recursive=self.args.recursive)
|
|
except DvcException:
|
|
logger.error('failed to add file')
|
|
return 1
|
|
return 0
|