Bazel: Portable way to guess whether root directory is reached

Change-Id: I582aca7d9ba8a8b17e6d54580490f242dfe0926d
This commit is contained in:
David Ostrovsky 2017-08-30 09:03:20 +02:00
parent e2eed17d37
commit e89717db20

View File

@ -85,7 +85,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