Merge pull request #939 from hfchong/fix-base-find-root

Fix _find_root in base.py
This commit is contained in:
Ruslan Kuprieiev
2018-07-23 12:48:47 +03:00
committed by GitHub
+3 -1
View File
@@ -24,10 +24,12 @@ class CmdBase(object):
from dvc.project import Project
root = os.getcwd()
while not os.path.ismount(root):
while True:
dvc_dir = os.path.join(root, Project.DVC_DIR)
if os.path.isdir(dvc_dir):
return root
if os.path.ismount(root):
break
root = os.path.dirname(root)
msg = "Not a dvc repository (checked up to mount point {})"
raise DvcException(msg.format(root))