mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-02 03:48:26 +00:00
Don't log a panic when there are no releases
This commit is contained in:
parent
fbd22e7b94
commit
fa9df4dc5e
@ -93,6 +93,10 @@ func currentRelease() (githubRelease, error) {
|
||||
json.NewDecoder(resp.Body).Decode(&rels)
|
||||
resp.Body.Close()
|
||||
|
||||
if len(rels) == 0 {
|
||||
return githubRelease{}, errors.New("no releases found")
|
||||
}
|
||||
|
||||
if strings.Contains(Version, "-beta") {
|
||||
// We are a beta version. Use whatever we can find that is newer-or-equal than current.
|
||||
for _, rel := range rels {
|
||||
|
Loading…
x
Reference in New Issue
Block a user