mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-28 03:49:31 +00:00
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>
This commit is contained in:
parent
54fc5f3ff3
commit
455f4cd43e
1 changed files with 1 additions and 1 deletions
|
|
@ -384,7 +384,7 @@ _digitalocean_max_parallel() {
|
|||
_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; }
|
||||
_available=$(( _limit - _existing ))
|
||||
if [ "${_available}" -lt 1 ]; then
|
||||
log_warn "DigitalOcean droplet limit reached: ${_existing}/${_limit} droplets in use (0 available)"
|
||||
log_warn "DigitalOcean droplet limit reached: ${_existing}/${_limit} droplets in use (0 available)" >&2
|
||||
printf '0'
|
||||
else
|
||||
printf '%d' "${_available}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue