diff options
author | Patrik Teivonen <patrik.teivonen@qt.io> | 2023-04-13 14:52:38 +0300 |
---|---|---|
committer | Patrik Teivonen <patrik.teivonen@qt.io> | 2023-05-02 09:31:10 +0000 |
commit | 57489c285487ce59d72bd39dbceb9eae4d03f570 (patch) | |
tree | 16b6a4547b69b621d3eb79458cf21cebea97cab8 | |
parent | 26797da68d56df2101dd18d6c0df85619811887a (diff) |
release_repo_updater.spawn_remote_background_task: exit with exit code
When logging script output with pipe, also return with the original
exit code to avoid failing silently. The release_repo_updater.py script
should not continue if this happens.
Fixes: QTBUG-106022
Change-Id: I291ef04762680dd7bda7cb3f0c3addf6726fa6d4
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
-rwxr-xr-x | packaging-tools/release_repo_updater.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packaging-tools/release_repo_updater.py b/packaging-tools/release_repo_updater.py index 7cd02c023..59f3e57c4 100755 --- a/packaging-tools/release_repo_updater.py +++ b/packaging-tools/release_repo_updater.py @@ -628,7 +628,7 @@ async def sync_production_repositories_to_ext(server: str, ext: str, updated_pro def spawn_remote_background_task(server: str, server_home: str, remote_cmd: List[str], remote_log_file: str, tip: str) -> None: if not tip: tip = "" - cmd = remote_cmd + ["2>&1", "|", "tee", remote_log_file] + cmd = remote_cmd + ["2>&1", "|", "tee", remote_log_file, "&&", "exit", "${PIPESTATUS[0]}"] remote_script_file_name = "sync-production-" + tip + "-" + timestamp + ".sh" execute_remote_cmd(server, server_home, cmd, remote_script_file_name, timeout=60 * 60 * 2) # 2h timeout for uploading data to CDN |