From 88492766e8a37eab7b6aa77290758bc3c36dde68 Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Tue, 16 Dec 2025 17:25:04 +0800 Subject: [PATCH] fix(ios-test): remove local keyword from top-level assignments The script was using 'local' keyword outside of function scope, which caused "local: can only be used in a function" error when running test-phase2.sh. Removed 'local' from three variable assignments (device_id and logs) at script top level, as 'local' is only valid inside functions in bash/zsh. --- test-apps/ios-test-app/test-phase2.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test-apps/ios-test-app/test-phase2.sh b/test-apps/ios-test-app/test-phase2.sh index 6e78a2e..f33b5da 100755 --- a/test-apps/ios-test-app/test-phase2.sh +++ b/test-apps/ios-test-app/test-phase2.sh @@ -33,7 +33,7 @@ check_plugin_configured wait_for_ui_action "Schedule a notification for future time." print_info "Terminating app to simulate system termination..." -local device_id=$(get_simulator_id) +device_id=$(get_simulator_id) xcrun simctl terminate "${device_id}" "${APP_BUNDLE_ID}" 2>/dev/null || true sleep 3 @@ -43,8 +43,8 @@ launch_app sleep 5 print_info "Checking logs for termination detection..." -local device_id=$(get_simulator_id) -local logs=$(get_app_logs "${device_id}" 100) +device_id=$(get_simulator_id) +logs=$(get_app_logs "${device_id}" 100) if echo "${logs}" | grep -q "termination\|DNP-REACTIVATION"; then print_success "Recovery activity detected"