mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
ignore: more reliable install script, handle non prettified json responses (#2745)
Some checks are pending
deploy / deploy (push) Waiting to run
Some checks are pending
deploy / deploy (push) Waiting to run
Co-authored-by: rekram1-node <aidenpcline@gmail.com>
This commit is contained in:
parent
75157e515c
commit
6404bd006d
1 changed files with 1 additions and 1 deletions
2
install
2
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}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue