Bazel: Portable way to guess whether root directory is reached
Change-Id: I582aca7d9ba8a8b17e6d54580490f242dfe0926d
(cherry picked from commit e89717db20
)
This commit is contained in:
@@ -84,7 +84,7 @@ opts.add_option('--unsign', action='store_true')
|
|||||||
args, _ = opts.parse_args()
|
args, _ = opts.parse_args()
|
||||||
|
|
||||||
root_dir = args.o
|
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)
|
root_dir, n = path.split(root_dir)
|
||||||
if n == 'WORKSPACE':
|
if n == 'WORKSPACE':
|
||||||
break
|
break
|
||||||
|
Reference in New Issue
Block a user