GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tweak: make install script handle 404s better · abi/opencode@8416db0

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • install
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎install‎

Copy file name to clipboardExpand all lines: install
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,18 @@ if [ -z "$requested_version" ]; then
155155
exit 1
156156
fi
157157
else
158+
# Strip leading 'v' if present
159+
requested_version="${requested_version#v}"
158160
url="https://github.com/sst/opencode/releases/download/v${requested_version}/$filename"
159161
specific_version=$requested_version
162+
163+
# Verify the release exists before downloading
164+
http_status=$(curl -sI -o /dev/null -w "%{http_code}" "https://github.com/sst/opencode/releases/tag/v${requested_version}")
165+
if [ "$http_status" = "404" ]; then
166+
echo -e "${RED}Error: Release v${requested_version} not found${NC}"
167+
echo -e "${MUTED}Available releases: https://github.com/sst/opencode/releases${NC}"
168+
exit 1
169+
fi
160170
fi
161171

162172
print_message() {

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.