Handle lack of internet

This commit is contained in:
Juan Font Alonso 2021-09-27 17:12:31 +02:00
parent 2048e9e136
commit 7c37086dd6

View file

@ -46,8 +46,8 @@ func main() {
}
if cli.Version != "dev" {
res, _ := latest.Check(githubTag, cli.Version)
if res.Outdated {
res, err := latest.Check(githubTag, cli.Version)
if err == nil && res.Outdated {
fmt.Printf("An updated version of Headscale has been found (%s vs. your current %s). Check it out https://github.com/juanfont/headscale/releases\n",
res.Current, cli.Version)
}