Fixed the root path check in the cyclic_dependency.py.

Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/0898a77b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/0898a77b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/0898a77b

Branch: refs/heads/fix-iwyu
Commit: 0898a77beac5ccb9c97675148bcf853a5490e279
Parents: 7fb7a77
Author: Zuyu Zhang <z...@cs.wisc.edu>
Authored: Mon Oct 2 20:47:44 2017 -0500
Committer: Zuyu Zhang <z...@cs.wisc.edu>
Committed: Tue Oct 3 10:48:45 2017 -0500

----------------------------------------------------------------------
 cyclic_dependency.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/0898a77b/cyclic_dependency.py
----------------------------------------------------------------------
diff --git a/cyclic_dependency.py b/cyclic_dependency.py
index adb5fc7..4914e0b 100755
--- a/cyclic_dependency.py
+++ b/cyclic_dependency.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 
 # Script to do analyze the dependencies in Quickstep particularly cycles in the
 # dependency graph. This script can be used to find:
@@ -169,7 +169,7 @@ def find_path(G, nodes_list, nodes_map, source, target):
         print('No path.')
 
 def main():
-    if not os.getcwd().endswith("quickstep"):
+    if not os.path.isfile("cyclic_dependency.py"):
         print("WARNING: you don't appear to be running in the root quickstep "
               "source directory. Don't blame me if something goes wrong.")
     qs_module_dirs = []

Reply via email to