1 parent 75157e5 commit 6404bd0Copy full SHA for 6404bd0
1 file changed
install
@@ -46,7 +46,7 @@ mkdir -p "$INSTALL_DIR"
46
47
if [ -z "$requested_version" ]; then
48
url="https://github.com/sst/opencode/releases/latest/download/$filename"
49
- 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')
50
51
if [[ $? -ne 0 || -z "$specific_version" ]]; then
52
echo -e "${RED}Failed to fetch version information${NC}"
0 commit comments