diff --git a/tools/eclipse/project.py b/tools/eclipse/project.py index 50644ebe2d..200831689f 100755 --- a/tools/eclipse/project.py +++ b/tools/eclipse/project.py @@ -32,7 +32,7 @@ JRE = '/'.join([ ]) ROOT = path.abspath(__file__) -for _ in range(0, 3): +while not path.exists(path.join(ROOT, '.buckconfig')): ROOT = path.dirname(ROOT) opts = OptionParser() diff --git a/tools/maven/mvn.py b/tools/maven/mvn.py index 9e36b4839e..6a33bcfe30 100644 --- a/tools/maven/mvn.py +++ b/tools/maven/mvn.py @@ -34,7 +34,7 @@ if not args.v: exit(1) root = path.abspath(__file__) -for _ in range(0, 3): +while not path.exists(path.join(root, '.buckconfig')): root = path.dirname(root) if 'install' == args.a: