Skip to content

Commit 706a78e

Browse files
foxishclaude
andcommitted
Fix archive URL detection using explicit HTTP status check
Replace curl -f exit code check with explicit %{http_code} comparison to reliably detect whether the new _mcp_ archive exists for a release. The previous --head check gave false positives on Linux due to redirect chain behavior, causing installs to fail with 404 for older releases. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6232347 commit 706a78e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scripts/install.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ _download_url() {
6565
# Try new naming convention (with _mcp_), fall back to old for older releases
6666
new_url="https://github.com/signadot/cli/releases/download/${tag}/signadot-cli_mcp_${os}_${arch}.tar.gz"
6767
old_url="https://github.com/signadot/cli/releases/download/${tag}/signadot-cli_${os}_${arch}.tar.gz"
68-
if curl -sSLf --head "$new_url" > /dev/null 2>&1; then
68+
status=$(curl -sSL --head -o /dev/null -w "%{http_code}" "$new_url" 2>/dev/null)
69+
if [ "$status" = "200" ]; then
6970
echo "$new_url"
7071
else
7172
echo "$old_url"

0 commit comments

Comments
 (0)