mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-09 23:10:24 +01:00
23 lines
596 B
Python
23 lines
596 B
Python
import dvc.logger as logger
|
|
from dvc.command.base import CmdBase
|
|
|
|
|
|
class CmdInstall(CmdBase):
|
|
def run_cmd(self):
|
|
try:
|
|
self.project.install()
|
|
except Exception:
|
|
logger.error('failed to install dvc hooks')
|
|
return 1
|
|
return 0
|
|
|
|
|
|
def add_parser(subparsers, parent_parser):
|
|
INSTALL_HELP = 'Install dvc hooks into the repository.'
|
|
install_parser = subparsers.add_parser(
|
|
'install',
|
|
parents=[parent_parser],
|
|
description=INSTALL_HELP,
|
|
help=INSTALL_HELP)
|
|
install_parser.set_defaults(func=CmdInstall)
|