Skip to content

Commit 1ce15ae

Browse files
committed
Fix exit code when ripunzip isn't called.
1 parent fa6d618 commit 1ce15ae

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

misc/bazel/internal/install.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,11 @@ def rmdir(dir: pathlib.Path):
8585
if destdir.exists() and opts.cleanup:
8686
rmdir(destdir)
8787

88+
8889
class RetryException(Exception):
8990
pass
9091

92+
9193
attempts = 0
9294
success = False
9395
while attempts < 3 and not success:
@@ -114,5 +116,5 @@ class RetryException(Exception):
114116
print(f"Failed to unzip {zip} to {dest}, retrying installation...")
115117
rmdir(destdir)
116118
break
117-
118-
sys.exit(ret.returncode)
119+
if not success:
120+
sys.exit(1)

0 commit comments

Comments
 (0)