Skip to content

Commit

Permalink
Update package_manager.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed May 12, 2024
1 parent 5e0bc77 commit 558074f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions pep600_compliance/images/package_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,10 @@ def _upgrade(self, container):
["slackpkg", "-default_answer=yes", "-batch=on", "install-new"]
)
assert exit_code == 0, output.decode("utf-8")
exit_code, output = container.exec_run(
["slackpkg", "-default_answer=yes", "-batch=on", "upgrade-all"]
)
assert exit_code in {0, 20, 50}, output.decode("utf-8")
if exit_code == 50:
exit_code = 50
while exit_code == 50:
# Slackpkg itself was upgraded and you need to re-run it.
exit_code, output = container.exec_run(
["slackpkg", "-default_answer=yes", "-batch=on", "upgrade-all"]
)
assert exit_code == {0, 20}, output.decode("utf-8")
assert exit_code in {0, 20, 50}, f"exit_code: {exit_code}\n" + output.decode("utf-8")

0 comments on commit 558074f

Please sign in to comment.