-
Notifications
You must be signed in to change notification settings - Fork 131
Open
Description
Problem
install.sh --staging fails on macOS with curl: (3) URL rejected: Malformed input to a URL function.
Two root causes:
1. BSD sed \s incompatibility (Critical)
get_latest_prerelease_version() uses \s* in the sed regex (lines 234, 241):
sed -E 's/.*"tag_name":\s*"([^"]+)".*/\1/'\s is a GNU sed extension. macOS ships BSD sed where \s matches literal s, not whitespace. The regex fails to match, sed returns the entire raw JSON line, and VERSION becomes:
"tag_name": "v0.1.48-rc.2", "prerelease": true,
This gets interpolated into the download URL → malformed URL → curl rejects it.
Note: get_latest_stable_version() does NOT have this bug — it uses sed -E 's/.*"([^"]+)".*/\1/' (no \s).
2. Documentation: VERSION=X curl ... | bash pipe scoping
The documented version pinning pattern doesn't work:
# Documented (BROKEN) — VERSION scopes to curl, not bash
VERSION=v0.1.48-rc.2 curl -fsSL https://agentfield.ai/install.sh | bashIn POSIX shells, VAR=val cmd1 | cmd2 sets VAR only for cmd1. The bash process executing the script never sees VERSION.
Affected locations:
scripts/install.shline 6docs/RELEASE.mdlines 200, 210, 213
Reproduction
# On macOS:
curl -fsSL https://agentfield.ai/install.sh | bash -s -- --staging
# Output: "Installing STAGING version: "tag_name": "v0.1.48-rc.2", ..."
# Error: curl: (3) URL rejected: Malformed input to a URL functionFix
- Replace
\s*with POSIX[[:space:]]*in both sed patterns - Fix documented env var patterns to
curl ... | VERSION=X bash
Environment
- macOS 15 (Apple Silicon)
- bash 5.x / zsh 5.9
- AgentField v0.1.47 installed, attempting upgrade to v0.1.48-rc.2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels