From 6404bd006dd6f389ccf73deba9cb9393b58e072c Mon Sep 17 00:00:00 2001 From: Alain Schlesser Date: Tue, 23 Sep 2025 21:58:04 +0200 Subject: [PATCH] ignore: more reliable install script, handle non prettified json responses (#2745) Co-authored-by: rekram1-node --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index b690ba31..002f91a7 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}"