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: if destdir.exists() and opts.cleanup:
rmdir(destdir) rmdir(destdir)
class RetryException(Exception): class RetryException(Exception):
pass pass
attempts = 0 attempts = 0
success = False success = False
while attempts < 3 and not success: 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...") print(f"Failed to unzip {zip} to {dest}, retrying installation...")
rmdir(destdir) rmdir(destdir)
break break
if not success:
sys.exit(ret.returncode) sys.exit(1)