File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -138,15 +138,15 @@ run_agent_task() {
138138
139139 # Add prompt args (e.g., -p)
140140 if [ -n " $AGENT_PROMPT_ARGS " ]; then
141- # shellcheck disable=SC2206
142- CMD_ARGS+=($AGENT_PROMPT_ARGS )
141+ read -ra _PROMPT_PARTS <<< " $AGENT_PROMPT_ARGS "
142+ CMD_ARGS+=(" ${_PROMPT_PARTS[@]} " )
143143 fi
144144 CMD_ARGS+=(" $FULL_PROMPT " )
145145
146146 # Add auto-approve args (e.g., --yes, --sandbox)
147147 if [ -n " $AGENT_APPROVE_ARGS " ]; then
148- # shellcheck disable=SC2206
149- CMD_ARGS+=($AGENT_APPROVE_ARGS )
148+ read -ra _APPROVE_PARTS <<< " $AGENT_APPROVE_ARGS "
149+ CMD_ARGS+=(" ${_APPROVE_PARTS[@]} " )
150150 fi
151151
152152 # Run the agent in the work directory with a timeout
@@ -304,6 +304,10 @@ run_task_trials() {
304304 done
305305
306306 # Calculate aggregate metrics
307+ if [ " $TRIALS " -le 0 ]; then
308+ echo " ERROR: TRIALS must be > 0" >&2
309+ return 1
310+ fi
307311 local PASS_RATE
308312 PASS_RATE=$( echo " scale=2; $PASS_COUNT / $TRIALS " | bc)
309313 # pass@k = 1 if at least one trial passed, else 0
You can’t perform that action at this time.
0 commit comments