sideload: fix double semicolon (MR 2252)

flat_cmd and everything really needs cleaned up.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-06-22 21:35:27 +02:00 committed by Oliver Smith
parent b89e300c26
commit 0fe6244f3c
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -74,7 +74,7 @@ def ssh_install_apks(args: PmbArgs, user, host, port, paths):
'-S', 'apk', '--wait', '30', 'add'] + remote_paths
add_cmd = pmb.helpers.run_core.flat_cmd([add_cmd])
clean_cmd = pmb.helpers.run_core.flat_cmd([['rm'] + remote_paths])
add_cmd_complete = shlex.quote(f"{add_cmd}; rc=$?; {clean_cmd}; exit $rc")
add_cmd_complete = shlex.quote(f"{add_cmd} rc=$?; {clean_cmd} exit $rc")
# Run apk command in a subshell in case the foreign device has a non-POSIX shell.
command = ['ssh', '-t', '-p', port, f'{user}@{host}',
f'sh -c {add_cmd_complete}']