Fix exit code when ripunzip isn't called.

This commit is contained in:
Cornelius Riemenschneider
2024-07-31 08:09:53 +02:00
parent fa6d61809e
commit 1ce15ae2fd

View File

@@ -85,9 +85,11 @@ def rmdir(dir: pathlib.Path):
if destdir.exists() and opts.cleanup:
rmdir(destdir)
class RetryException(Exception):
pass
attempts = 0
success = False
while attempts < 3 and not success:
@@ -114,5 +116,5 @@ while attempts < 3 and not success:
print(f"Failed to unzip {zip} to {dest}, retrying installation...")
rmdir(destdir)
break
sys.exit(ret.returncode)
if not success:
sys.exit(1)