pmb: sideload: Handle ssh_install_apks() errors (MR 2195)

Even add_cmd has exited with code 99, it will be overwritten by clean_cmd
later. Exit with code returned by add_cmd to raise a runtime error when
an error occurs.
This commit is contained in:
Raymond Hackley 2022-08-12 06:09:48 +00:00 committed by Oliver Smith
parent 3567b7c123
commit e5d580e98a
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ def ssh_install_apks(args, user, host, port, paths):
add_cmd = pmb.helpers.run.flat_cmd(add_cmd)
clean_cmd = pmb.helpers.run.flat_cmd(['rm'] + remote_paths)
command = ['ssh', '-t', '-p', port, f'{user}@{host}',
f'{add_cmd}; {clean_cmd}']
f'{add_cmd}; rc=$?; {clean_cmd}; exit $rc']
pmb.helpers.run.user(args, command, output="tui")