diff options
| author | CodinCat <[email protected]> | 2025-07-15 09:13:12 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-14 20:13:12 -0400 |
| commit | d6eff3b3a31192b3c37e03ebff278cbc8ace2023 (patch) | |
| tree | bce1fab86d950a24658d45135a9041fa38ef6766 /install | |
| parent | e63a6d45c1e473c10dd7d5db75b06cba4953a1bc (diff) | |
| download | opencode-d6eff3b3a31192b3c37e03ebff278cbc8ace2023.tar.gz opencode-d6eff3b3a31192b3c37e03ebff278cbc8ace2023.zip | |
improve error handling and logging for GitHub API failures in upgrade and install script (#972)
Diffstat (limited to 'install')
| -rwxr-xr-x | install | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -48,7 +48,7 @@ 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}') - if [[ $? -ne 0 ]]; then + if [[ $? -ne 0 || -z "$specific_version" ]]; then echo "${RED}Failed to fetch version information${NC}" exit 1 fi |
