Bazel: Portable way to guess whether root directory is reached

Change-Id: I582aca7d9ba8a8b17e6d54580490f242dfe0926d
(cherry picked from commit e89717db20)
This commit is contained in:
David Ostrovsky
2017-08-30 09:03:20 +02:00
parent 4cdd7f7d86
commit 262a4da88f

View File

@@ -84,7 +84,7 @@ opts.add_option('--unsign', action='store_true')
args, _ = opts.parse_args()
root_dir = args.o
while root_dir and root_dir != "/":
while root_dir and path.dirname(root_dir) != root_dir:
root_dir, n = path.split(root_dir)
if n == 'WORKSPACE':
break