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:
parent
3567b7c123
commit
e5d580e98a
|
@ -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")
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue