mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-09 19:49:58 +00:00
Issue #1572: Replace bash 4+ ${//} pattern substitution in generate_env_config with sed for macOS bash 3.2 compatibility. Issue #1571: Split local var=$(cmd) declarations in fly/lib/common.sh so exit codes propagate correctly with set -e on macOS bash 3.2. Agent: code-health Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ce8b1afdf8
commit
ed9501235b
2 changed files with 7 additions and 3 deletions
|
|
@ -685,8 +685,10 @@ except Exception:
|
|||
|
||||
# List all Fly.io apps and machines
|
||||
list_servers() {
|
||||
local org=$(get_fly_org)
|
||||
local response=$(fly_api GET "/apps?org_slug=$org")
|
||||
local org
|
||||
org=$(get_fly_org)
|
||||
local response
|
||||
response=$(fly_api GET "/apps?org_slug=$org")
|
||||
|
||||
printf '%s' "$response" | python3 -c "
|
||||
import json, sys
|
||||
|
|
|
|||
|
|
@ -1278,7 +1278,9 @@ generate_env_config() {
|
|||
fi
|
||||
|
||||
# Escape any single quotes in the value: replace ' with '\''
|
||||
local escaped_value="${value//\'/\'\\\'\'}"
|
||||
# Use sed instead of ${//} pattern substitution for bash 3.2 (macOS) compat
|
||||
local escaped_value
|
||||
escaped_value=$(printf '%s' "$value" | sed "s/'/'\\\\''/g")
|
||||
echo "export ${key}='${escaped_value}'"
|
||||
done
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue