Skip to content
Snippets Groups Projects
Unverified Commit 976b3319 authored by Petr Hodina's avatar Petr Hodina
Browse files

mrtest: add_packages: Handle case when sudo/doas fails (MR 22)

parent cdef7fde
No related branches found
No related tags found
No related merge requests found
......@@ -61,7 +61,7 @@ def run_apk_add(origin, mr_id, apk_paths):
print("Installing packages...")
logging.debug(f"+ {cmd}")
subprocess.run(cmd)
subprocess.run(cmd, check=True)
def confirm_mr_id(origin, mr_id):
......@@ -120,6 +120,10 @@ Please trigger again the MR {} to generate the packages.
exit(0)
apk_paths = extract_apks(zip_path, selection)
run_apk_add(origin, mr_id, apk_paths)
try:
run_apk_add(origin, mr_id, apk_paths)
except subprocess.CalledProcessError:
print("Failed to install packages!")
exit(1)
print("All done! Use 'mrtest zap' to uninstall added packages.")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment