From f7a2377779a4140d2966f6b8f3d12e40bf1edc4d Mon Sep 17 00:00:00 2001 From: hfchong Date: Mon, 23 Jul 2018 17:33:06 +0800 Subject: [PATCH] Fix _find_root in base.py --- dvc/command/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dvc/command/base.py b/dvc/command/base.py index 5603cb065..59b201a34 100644 --- a/dvc/command/base.py +++ b/dvc/command/base.py @@ -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))