fix(land-and-deploy): stop greedy sed from eating the URL scheme in deploy-config parsing

The deploy-config bootstrap parsed "Production URL: https://x.com" with
sed 's/.*: *//', which cuts at the LAST colon — the one in "https:" —
yielding "//x.com". Cut at the first ": " instead (s/^[^:]*: *//).

Resolver only; the generated land-and-deploy/SKILL.md regenerates from
this source in the docs lane.

Contributed by @briascoi (PRs #2555/#2493).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Garry Tan 2026-08-14 19:17:42 -07:00
parent e5dda3b3e1
commit a73d868413
No known key found for this signature in database
GPG Key ID: C1F69E85C74EFE1D
1 changed files with 5 additions and 2 deletions

View File

@ -57,8 +57,11 @@ echo "$DEPLOY_CONFIG"
# If config exists, parse it
if [ "$DEPLOY_CONFIG" != "NO_CONFIG" ]; then
PROD_URL=$(echo "$DEPLOY_CONFIG" | grep -i "production.*url" | head -1 | sed 's/.*: *//')
PLATFORM=$(echo "$DEPLOY_CONFIG" | grep -i "platform" | head -1 | sed 's/.*: *//')
# Cut at the FIRST ": ", not the last. A greedy 's/.*: *//' ate the scheme of
# any URL: "Production URL: https://x.com" became "//x.com", because the last
# ":" belongs to "https:".
PROD_URL=$(echo "$DEPLOY_CONFIG" | grep -i "production.*url" | head -1 | sed 's/^[^:]*: *//')
PLATFORM=$(echo "$DEPLOY_CONFIG" | grep -i "platform" | head -1 | sed 's/^[^:]*: *//')
echo "PERSISTED_PLATFORM:$PLATFORM"
echo "PERSISTED_URL:$PROD_URL"
fi