mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 23:10:42 +01:00
Merge pull request #939 from hfchong/fix-base-find-root
Fix _find_root in base.py
This commit is contained in:
+3
-1
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user