summaryrefslogtreecommitdiffhomepage
path: root/install
diff options
context:
space:
mode:
authorAlain Schlesser <[email protected]>2025-09-23 21:58:04 +0200
committerGitHub <[email protected]>2025-09-23 14:58:04 -0500
commit6404bd006dd6f389ccf73deba9cb9393b58e072c (patch)
tree6a334c4ff70774e334e4fb517e1b33e7a4b490f1 /install
parent75157e515c482d7c8cf074f6046849468aa4f931 (diff)
downloadopencode-6404bd006dd6f389ccf73deba9cb9393b58e072c.tar.gz
opencode-6404bd006dd6f389ccf73deba9cb9393b58e072c.zip
ignore: more reliable install script, handle non prettified json responses (#2745)
Co-authored-by: rekram1-node <[email protected]>
Diffstat (limited to 'install')
-rwxr-xr-xinstall2
1 files changed, 1 insertions, 1 deletions
diff --git a/install b/install
index b690ba31d..002f91a73 100755
--- a/install
+++ b/install
@@ -46,7 +46,7 @@ mkdir -p "$INSTALL_DIR"
if [ -z "$requested_version" ]; then
url="https://github.com/sst/opencode/releases/latest/download/$filename"
- specific_version=$(curl -s https://api.github.com/repos/sst/opencode/releases/latest | awk -F'"' '/"tag_name": "/ {gsub(/^v/, "", $4); print $4}')
+ specific_version=$(curl -s https://api.github.com/repos/sst/opencode/releases/latest | sed -n 's/.*"tag_name": *"v\([^"]*\)".*/\1/p')
if [[ $? -ne 0 || -z "$specific_version" ]]; then
echo -e "${RED}Failed to fetch version information${NC}"