root: don't check project's lock

Fixes #1260

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2018-10-23 16:53:26 +03:00
parent 548dc3657b
commit 7493804312
2 changed files with 8 additions and 0 deletions
+3
View File
@@ -4,6 +4,9 @@ from dvc.command.base import CmdBase
class CmdRoot(CmdBase):
def run_cmd(self):
return self.run()
def run(self):
self.project.logger.info(os.path.relpath(self.project.root_dir))
return 0
+5
View File
@@ -28,6 +28,11 @@ class TestConfigCLI(TestDvc):
ret = main(['root'])
self.assertEqual(ret, 0)
# NOTE: check that `dvc root` is not blocked with dvc lock
with self.dvc.lock:
ret = main(['root'])
self.assertEqual(ret, 0)
def _do_test(self, local=False):
section = 'setsection'
field = 'setfield'