Skip to content

Commit fa6d618

Browse files
committed
Fix hang for targets without ripunzip.
1 parent 674a5bb commit fa6d618

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

misc/bazel/internal/install.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,11 @@ class RetryException(Exception):
9090

9191
attempts = 0
9292
success = False
93-
while attempts < 3 and success is False:
93+
while attempts < 3 and not success:
94+
attempts += 1
9495
destdir.mkdir(parents=True, exist_ok=True)
9596
subprocess.run([script, "--destdir", destdir], check=True)
97+
success = True
9698

9799
if opts.zip_manifest:
98100
ripunzip = runfiles.Rlocation(opts.ripunzip)
@@ -110,7 +112,6 @@ class RetryException(Exception):
110112
success = ret.returncode == 0
111113
if not success:
112114
print(f"Failed to unzip {zip} to {dest}, retrying installation...")
113-
attempts += 1
114115
rmdir(destdir)
115116
break
116117

0 commit comments

Comments
 (0)