From 8f53ca67f1dd6ed464ec7e961887d201dc4fc0ce Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Thu, 20 Feb 2025 08:32:54 +0000 Subject: [PATCH] [web] fix waiting for cdn upload on staging-main (#23729) Co-authored-by: Jimmy Domagala-Tang GitOrigin-RevId: fdf0f2c0b0b8c9e83a1ea6f6f71305f9ff822f1f --- services/web/bin/cdn_upload | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/web/bin/cdn_upload b/services/web/bin/cdn_upload index 983e4ee4f9..52281e4dd0 100755 --- a/services/web/bin/cdn_upload +++ b/services/web/bin/cdn_upload @@ -67,5 +67,7 @@ if [[ "$BRANCH_NAME" == "main" ]] || [[ "$BRANCH_NAME" == "staging-main" ]]; the fi wait "$pid_staging" # wait for staging upload to finish, wait(1) will exit if the upload failed - wait "$pid_production" # wait for production upload to finish (if started), wait(1) will exit if the upload failed + if [[ -n "$pid_production" ]]; then + wait "$pid_production" # wait for production upload to finish (if started), wait(1) will exit if the upload failed + fi fi