From c24ca693e8fdb752eb8bd942cd5a4dc50c82164a Mon Sep 17 00:00:00 2001 From: Samiran Saha Date: Tue, 9 Dec 2025 13:24:41 +0530 Subject: [PATCH] app-upload flow fix --- mac/common-utils.sh | 17 ++++++++++++----- mac/env-setup-run.sh | 2 +- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/mac/common-utils.sh b/mac/common-utils.sh index e41f4f8..d572770 100644 --- a/mac/common-utils.sh +++ b/mac/common-utils.sh @@ -102,13 +102,19 @@ handle_app_upload() { case $opt in "Use Sample App") choice="Use Sample App"; break ;; "Upload my App (.apk/.ipa)") choice="Upload my App"; break ;; - "Cancel") choice="Cancel"; break ;; - *) echo "Invalid option";; + "Cancel") choice="Cancel"; + log_error "App upload cancelled by user."; exit 1;; + *) + log_error "App upload cancelled by user."; exit 1;; + esac done fi - - if [[ "$choice" == *"Use Sample App"* ]]; then + + if [[ "$choice" == "" ]]; then + log_error "App upload cancelled by user." + exit 1 + elif [[ "$choice" == *"Use Sample App"* ]]; then upload_sample_app app_platform="android" export APP_PLATFORM="$app_platform" @@ -165,7 +171,8 @@ upload_custom_app() { if [ -z "$file_path" ]; then log_msg_to "❌ No file selected" - return 1 + log_error "App upload cancelled by user. No .apk /.ipa file path provided." + exit 1 fi log_info "Selected file: $file_path" diff --git a/mac/env-setup-run.sh b/mac/env-setup-run.sh index 398ce24..c57a329 100644 --- a/mac/env-setup-run.sh +++ b/mac/env-setup-run.sh @@ -17,7 +17,7 @@ setup_environment() { max_parallels=$TEAM_PARALLELS_MAX_ALLOWED_MOBILE fi - log_msg_to "Starting ${setup_type} setup for " "$tech_stack" "$NOW_RUN_LOG_FILE" + log_msg_to "Starting ${setup_type} setup for $tech_stack" "$NOW_RUN_LOG_FILE" local local_flag=false