mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 07:18:27 +01:00
15 lines
452 B
Python
15 lines
452 B
Python
from dvc.exceptions import DvcException
|
|
from dvc.command.base import CmdBase
|
|
|
|
|
|
class CmdRemove(CmdBase):
|
|
def run(self):
|
|
outs_only = not self.args.purge
|
|
for target in self.args.targets:
|
|
try:
|
|
self.project.remove(target, outs_only=outs_only)
|
|
except DvcException as ex:
|
|
self.project.logger.error('Failed to remove {}'.format(target), ex)
|
|
return 1
|
|
return 0
|