Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions download_cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,27 @@ DOWNLOAD_URL="https://github.com/$REPO/releases/download/$RELEASE_TAG/$FILE"
# --- 4) Download & extract 'goose' binary ---
echo "Downloading $RELEASE_TAG release: $FILE..."
if ! curl -sLf "$DOWNLOAD_URL" --output "$FILE"; then
echo "Error: Failed to download $DOWNLOAD_URL"
exit 1
# If the download fails, only fall back to latest stable when no version was specified and canary was not requested).
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in comment: remove the extra closing parenthesis after "requested".

Suggested change
# If the download fails, only fall back to latest stable when no version was specified and canary was not requested).
# If the download fails, only fall back to latest stable when no version was specified and canary was not requested.

Copilot uses AI. Check for mistakes.
if ! [ -n "${GOOSE_VERSION:-}" ] && [ "${CANARY:-false}" != "true" ]; then
LATEST_TAG=$(curl -s https://api.github.com/repos/block/goose/releases/latest | \
grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
if [ -z "$LATEST_TAG" ]; then
echo "Error: Failed to download $DOWNLOAD_URL and latest tag unavailable"
exit 1
fi

DOWNLOAD_URL="https://github.com/$REPO/releases/download/$LATEST_TAG/$FILE"
if curl -sLf "$DOWNLOAD_URL" --output "$FILE"; then
# Fallback succeeded
:
else
echo "Error: Failed to download from fallback url $DOWNLOAD_URL using latest tag $LATEST_TAG"
exit 1
fi
else
echo "Error: Failed to download $DOWNLOAD_URL"
exit 1
fi
fi

# Create a temporary directory for extraction
Expand Down
Loading