File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,6 +59,11 @@ while [ $# -gt 0 ]; do
5959 esac
6060done
6161
62+ if ! [[ " $SHARDS " =~ ^[0-9]+$ ]]; then
63+ echo " Error: --shards requires a numeric integer. Received: '$SHARDS '" >&2
64+ exit 1
65+ fi
66+
6267[ -z " $FLOWS " ] && FLOWS=" .maestro/enrichedInput/flows .maestro/enrichedText/flows"
6368
6469case " $PLATFORM " in
@@ -91,6 +96,10 @@ TTY_OUT=/dev/tty
9196( : > /dev/tty ) 2> /dev/null || TTY_OUT=/dev/stderr
9297
9398DEVICE_IDS_CSV=$( " $SETUP " " $SHARDS " | tee " $TTY_OUT " | grep " ^DEVICE_IDS=" | cut -d= -f2)
99+ if [ -z " $DEVICE_IDS_CSV " ]; then
100+ echo " Error: setup script did not return any DEVICE_IDS" >&2
101+ exit 1
102+ fi
94103IFS=' ,' read -r -a DEVICES <<< " $DEVICE_IDS_CSV"
95104DEVICE_ID=" ${DEVICES[0]} "
96105
Original file line number Diff line number Diff line change 1111set -euo pipefail
1212
1313NUM_DEVICES=" ${1:- 1} "
14+ if ! [[ " $NUM_DEVICES " =~ ^[0-9]+$ ]] || [ " $NUM_DEVICES " -lt 1 ]; then
15+ echo " Error: num_devices must be a positive integer (got '$NUM_DEVICES ')" >&2
16+ exit 1
17+ fi
1418
1519API_LEVEL=" 36"
1620DEVICE_ID=" pixel_9"
Original file line number Diff line number Diff line change 1111set -euo pipefail
1212
1313NUM_DEVICES=" ${1:- 1} "
14+ if ! [[ " $NUM_DEVICES " =~ ^[0-9]+$ ]] || [ " $NUM_DEVICES " -lt 1 ]; then
15+ echo " Error: num_devices must be a positive integer (got '$NUM_DEVICES ')" >&2
16+ exit 1
17+ fi
1418
1519DEVICE_TYPE=" com.apple.CoreSimulator.SimDeviceType.iPhone-17"
1620IOS_VERSION=" 26.2"
You can’t perform that action at this time.
0 commit comments