Skip to content

Commit 455f4cd

Browse files
la14-1spawn-qa-botlouisgv
authored
fix(e2e): redirect DO max_parallel log_warn to stderr (#3110)
_digitalocean_max_parallel() called log_warn which writes colored output to stdout, polluting the captured return value when invoked via cloud_max=$(cloud_max_parallel). The downstream integer comparison [ "${effective_parallel}" -gt "${cloud_max}" ] then fails with 'integer expression expected', silently leaving the droplet limit cap unapplied. Fix: redirect log_warn output to stderr so only the numeric value is captured. Co-authored-by: spawn-qa-bot <qa@openrouter.ai> Co-authored-by: L <6723574+louisgv@users.noreply.github.com>
1 parent 54fc5f3 commit 455f4cd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sh/e2e/lib/clouds/digitalocean.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ _digitalocean_max_parallel() {
384384
_existing=$(_do_curl_auth -sf "${_DO_API}/droplets?per_page=200" 2>/dev/null | grep -o '"id":[0-9]*' | wc -l | tr -d ' ') || { printf '3'; return 0; }
385385
_available=$(( _limit - _existing ))
386386
if [ "${_available}" -lt 1 ]; then
387-
log_warn "DigitalOcean droplet limit reached: ${_existing}/${_limit} droplets in use (0 available)"
387+
log_warn "DigitalOcean droplet limit reached: ${_existing}/${_limit} droplets in use (0 available)" >&2
388388
printf '0'
389389
else
390390
printf '%d' "${_available}"

0 commit comments

Comments
 (0)