diff --git a/cmd/syncthing/upgrade_supported.go b/cmd/syncthing/upgrade_supported.go index 63efd6dc7..49b8d66c0 100644 --- a/cmd/syncthing/upgrade_supported.go +++ b/cmd/syncthing/upgrade_supported.go @@ -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 {